I've been down the same road, If your riding with a group that is too fast, no amount of healthy eating is going to make you keep up. Even if you eat perfect the day/night morning before. I used to compensate by eating as much as I could but it never helped and in many ways made things worse.
There is also the issue of being properly recovered then your body will not make you feel so hungry. Ideally you should only need liquids and one bar or gel or banana to make it 50 miles in under 3 hours.
Yes training is the difference. I always try to hang with the A guys and get dropped here and there and sometimes they wait or re-group. My new rule is once I get dropped, turn around and leave the group cause I just always end up digging to deep a hole and wreck any training.
Best of luck.