I think they might be fungus gnat larvae, images lower down in this link,but ignore the rest of the information re fly traps, you're not at that stage
http://www.flytrapcare.com/phpBB3/pest-identification-and-control-t6170.html
Whatever they are, I wouldn't want them in my potted houseplants either, so I'd consider returning it from whence it came and either exchanging (no guarantee a replacement won't have the same trouble) or getting the money back. Another option is to buy some new potting mix, take the plant outside, remove from the pot, stand it in a container full of water to get off as much of the soil as possible (without damaging the roots). While the plant is sitting in the water, take the opportunity to thoroughly scrub the pot and rinse off so that its completely clean. Remove your plant from the water, leaving the soil behind, inspect the roots to see that they're not harbouring any more larvae, then carefully repot into the new potting mix.
Alternatively, try a soil drench with nematodes which target fungus gnat larvae - the one in the link below claims to treat various invaders in the soil
https://www.amazon.com/Pyes-Scanmask-Million-Beneficial-Nematodes/dp/B000MRD5JO?ie=UTF8&camp=1789&creative=390957&creativeASIN=B000MRD5JO&linkCode=as2&redirect=true&ref_=as_li_ss_tl&tag=smalfootfami-20
Ongoing, fungus gnats much prefer damp soil, so allow the top inch or two of the soil in the pot to dry out before watering, then water well and ensure the pot drains freely and is not left standing in water in a tray or outer pot after 30 minutes.