If you're sure you have fungus gnats and not winged root aphids then it's pretty simple to get rid of,
Get some cinnamon vinegar a few cups and yellow sticky traps if you have them or want to buy some, I didn't bother and they went away fine. You typically get fungus gnats when your top soil is constantly wet promoting fungus, what the larvae eat. Get a fair amount of cinnamon depending on how much surface you have to cover and sprinkle a fair amount all over the top soil of your plants and mix it thoroughly throughout the top 1-2" of your soil.
Fill as many cups as you want or see fit with vinegar, gnats will fly into it and die. The cinnamon is an anti fungal and it will destroy the fungus in your soil leaving the larvae with nothing to eat and continue the life cycle. The sticky traps should be pretty straight forward
Haven't seen a single gnat in my room after that and letting my soil thoroughly dry every time. I hope this helps, if you decide to go with this method let me know how it turns out for you!