Yes, the fungus gnat larvae that are living in the medium are the problem, they feed on the roots. If you use Gnatrol, it will kill them. You should mix a batch of Gnatrol solution, and feed your plants with it, then add nutrients to the solution and continue feeding for a week. Repeat that twice, and you're finished, and so are the gnats.
HTH