It shouldn't take long to get in shape if you are persistent. Like others said, learn to spin at a higher cadence rather than mashing gears. Make sure your seat is adjusted right because a seat that is too low (which is often the case) will really tire your legs and can injure your knees.
I quit riding in my 30s after our daughter was born and didn't start back up until my mid-40s. Within a few weeks, I was riding distances as far as 30-40 miles on weekends, and I rode a century about 6 months after starting back.