If drying it out doesn't work, Will Creed once suggested to me that I sprinkle a thin layer of builder's sand on top of the soil to cut the larvae up. I ended up not having to do it. I let my
plant dry out for about 10 days or so and that worked out fine for me.
Another thing he advised was to put some
potato slices on top of the soil. After a few days the larvae get into the
potato and you can then throw it away. Since the gnats I had went away with drying I didn't have to do that either, but he's very knowledeable so I'm sure it works.
Good luck.
Amanda