You might consider returning the plant to HD. They should not be selling plants that are infested with fungus gnats or any other pests.
However, if you repotted the plant yourself, then you probably introduced the gnats with the potting soil that you used. If that is the case, I suggest that you undo the repotting, discard all the soil you added and put the plant and its original rootball back into the original pot or one the same size that will not require you to add any new potting soil.
The gnat larvae live in the upper portion of the soil and feed on damp soil and rotting roots. The best treatment is to allow the soil to dry out fairly deep into the pot. Unfortunately, that is hard to do with a Fiddle Fig because it does not tolerate dry soil very well. You can try sprinkling a light, very thin layer of builders sand on the surface of the soil. Gnatrol is another alternative.
This is a plant that must be located in front of and close to a sunny uncovered window. If you can't provide that, then your tree will not do well even if you successfully eradicate the gnats. I would, therefore, recommend you exchange it for a plant that does not require so much direct indoor light and does not have pest problems.