Are you keeping it with the food side up and with the bottom (which would be the lid) propped up a little bit to allow air into the cup. They can suffocate if the lid os completely flat after a few days. I know these are basic things for hornworms but many people never seem to read the instructions provided on the side of the cups. I'm not saying you didn't but I really have never had hornworms die for any other reason. I think out of the 3,000 or so hornworms I have hatched, raised to pupation, bred as moths, and hatched again I have lost maybe 100 of them while they were worms and this was only due to them being too dry and unable to shed their skin when I had them on a heating pad. I have lost probably another 150 or more as moths due to dry hatching substrate which did not allow them to completely emerge from their pupae state and use their proboscises. But other than that they are probably the hardiest feeder I have used besides roaches. I find silkworms to be a close third, even though many will disagree. I have yet to have mass die off of silkies. I only seem to lose a few out of every 100 I hatch and thats due to them either being too far away from the food or being retarded and making oblong cocoons and running out of silk. Lol. If none of these seem to be the problem I would contact the seller and explain what happened and tell them how you were keeping them and see if they have any advice.
Justin