m0useanswered grow question a year ago [Beneficial Nematodes] I use the brand pot popper.
Also kills the larva outright via microscopic parasitic worms and the adults die off from the lights and fans in mass anyways. You will notice a 100% turnaround in about 6 days times.
If your also looking for something to snag the adults growing a CP - carnivorous plants can help control them. The one I had in my tent for a bit is called a Butterwort, sticky leaves and the gnats fly down for a snack and the plants eat em. Venus Flytraps don't do shit, they eat larger prey like house fly's and spiders, smaller pitcher plants or Sundews may work as well but the best is a Butterwort hands down. I got mine off of facebook marketplace, local carnivorous plant grower. Can also use sticky traps and BTI like EZZ suggested below.
Good Luck!