I'm glad you're taking him back for your own peace of mind and - possibly - for him to find a more suitable home. Honestly, it's likely he'll go into another situation just like this one and ultimately starve to death anyway where ever he ends up. Like BrianD said, it's not that they are hard fish to keep per se, it is that they are specialized eaters and most of us just can't maintain that needed level of pods in our closed systems. There are places that are currently breeding dragonettes and swear they eat frozen. Maybe that's true and someday we can all have one in our tanks, but unless you personally see one eat a piece of frozen food before you buy, I wouldn't believe it.
We've all been there so don't feel bad. You're doing the right thing by him by taking him back. As someone on my local forum said, "we aren't in a race to kill animals" so just take it slow and research, research, research, before you buy something. I stand around my LFS for an hour or more at a time when I go. I'll see something, look it up on my phone, read what it says from other hobbyists on here or I like to look on Live Aquaria for their feeding and housing recommendations as a 'quick guide' kinda deal, and then decide if I'm gonna purchase or not. No one says "hey, if you're just going to stand around you need to leave!" lol, so go ahead and take your time at the store. You can't know everything about every animal you see when you walk in to the LFS. Not even long-time hobbyists can know everything. So it's no big deal to just say 'I need a minute' and bust out your phone to see what you may be getting into when you find something you like.
Good Luck to you!!