When I 1st started riding regularly I would run out of gas at 20 miles. I didn't matter if I was riding 20 miles or 50 miles, I was always bonking at 20. I would then stop and take in some calories. I did this for a year before I figured out that I need to be fueling my body right from the start and very regularly on rides over 20 miles. Now 100 is achievable when my pockets are loaded up with gels and beans and bars. The occasional stop at a gas station for a donut doesn't hurt on a very long ride.
It just takes time to figure out what your body needs and what works for you. Good luck, and congrats on the accomplishment!