Unfortunately some little corns just aren't meant to be. Snakes naturally over produce because in the wild, the probability of the whole clutch making it is rather slim. In captivity I think surviving clutch numbers are larger, because of intervention from the whole "eat or be eaten" element.
Sometimes snakes just die though. It's unfortunate, but I think that it's actually somewhat natural. Generally I think there's less likely of a chance of getting a snake that will just randomly die on you if you buy from a reputable breeder. A reputable breeder will also most likely work with you in a situation like this.
When buying corns from pet stores or non - reputable breeders, however, who knows what could happen.
I think many snake keepers have had instances of "sudden death" in hatchlings. I experienced it once with a free bee that I got along with an order of other snakes. The breeder informed me that the snake was a non feeder, and that he might not have a chance, but I could have him, and hopefully he'd thrive for me.
Unfortunately he didn't. It was less hard of a blow though, because the breeder informed me of the snake's state, and I knew what to expect.
A non reputable breeder might sell you that same snake at full price with no information.. a pet store employee might be clueless about a snake's background, and who knows, may even flat out lie about the number of meals a snake has had.
Anyway, hopefully this doesn't taint your snake keeping experience. I hope you can move on, and that your next snake is healthy and grows normally. If you got this snake from a breeder you're still in contact with, contact them and see if there's anything they can do to help.