This is such a common problem when new plants are unnecessarily and/or incorrectly repotted.
The fact that they are not drying out after two weeks is evidence that they are in pots that are too big. Beyond the fungus gnat problem, there is real danger that the roots of your plants are starting to suffocate (rot) because of the excess soil that takes too long to dry out. That is a much bigger potential problem than the fungus gnats.
As Lin pointed out, the gnats were introduced with the potting soil that you used. Some photos would be helpful, but in their absence, I suggest that you undo the repotting that you did by carefully removing the contaminated soil your added but leaving the original rootball intact. Then put the plants back into the original pots or ones that are of similar size without any added soil.
For future reference, it is much better to double pot your new plants rather than repotting them. If you do have reason to repot, you might try using a potting mix of 4 parts peat moss and 1 part perlite. Bagged potting mixes are too often contaminated.