I bought some soil, in a garden store, it looked perfectly but it was not. Thats the reson you got to buy the soil in sterilized bags, from a good brand, and in a good store, now im using a soil "happy flower" brand, sold in home depot.
when i got the maggots, i just fert the plant, and water it, the incects came in the soil...

but now i know that if you get an infestation, you got to act very quick... buy liquid and powder poison for insects, the liquid you put it in a plate under the pot, so the soil can absorb it, and the powder over the soil... using together, to kill em fast, and make your plant live...