Get plenty of saddle time. Start out with short rides. Time is usually a better indicator than distance, start with 10mins then 15, 20 etc. Once you are over 40mins in the saddle, you have a ride of suitable length for regular fitness training.
Do longer rides at weekends.
You will travel at roughly 10mph, inc stops, so in 2 hours you cover 20 miles.
Make sure bike fits and is properly adjusted for you. Use your gears so you are pedalling with a little force, at over 60rpm, with your feet spinning circles, not pumping up and down. Many newbies start at much lower rpm and too much force, ie in a gear that is too high.