If it's indoor...
Hydrogen peroxide will only kill the fungus the larvae feed on, temporarily. Larvae will die of starvation. Gnats will hook up and lay more larvae once the fungus comes back. And the fungus will come back. In my experience, H2O2 soaking doesn't work. It's cool when your soil boils over, but has never worked for me. I only use it for foliar sprays. Yellow stickes don't get rid of larvae or fungus.
The quickest and easiest thing to do is increase air flow around your soil and pots. Don't give the gnats a chance to land. When the larvae pop, they get blown when they take off. It also helps dry your soil a little faster, reducing moisture.
Again, in my experience, diatomaceous earth will make your soil like moving through glass to bugs and is the best option in the long run. Mix it in with your soil when you (trans)plant and you pretty much eliminate anything that would otherwise mount a ground attack. After the fact is a little tedious as it requires adding treated soil and/or removing the infected.