When I get back into it, which I've done several times

, I'll work towards a goal of beating my previous distance.
Start out by peddling for 20 minutes if you can. If you can't, go as long as you can. Use the first 5 for warmup and the last 5 for cooldown. Push yourself enough to become somewhat uncomfortable. Record your distance and time.
Bike three times a week. Each session now try to improve your distance. When you are comfortable at 20 mins, move to 25 or 30 mins.