High, to get rid of the fungus gnats you put 1 inch of sand on top of the soil. I did this many times and the gnats can not enter the soil anymore. The larvea can be killed with a neem oil solution. It is very cheap and water 3 times during 1 week with 3% neem oil inside the solution and the larvea will be death aswell.
But the problem with the leaves are not caused by gnats but because of nutrient deficiency. When growing weed it is important to give water with the right pH and the right type and amount with nutrients.
You can purchase a brand like BioBizz for the right NPK ratio during the entire grow by just following their nutrient schedule available on their website.
Happy Holidays!