I'm a new cyclist and I was like you. I found the barrier to longer rides was largely psychological, and once I passed that 'I can't do it!' phase, I felt like I could cycle forever.

Just ensure you fuel and hydrate your body appropriately and you'll be good to go Oh, and listen to your body. If you need a break, take one.