The key thing TSL said is "all in", as in get stubborn and do it. Like him I vividly recall my first adult bike ride, beyond a walking pace mile around the park. All of 2.5 miles to the Kroger parking lot to fix my wife's car. It was hot, there was a hill, and I thought I was extreme to even try it. The first thing I did was shove the bike in the back seat because I sure as heck wasn't going to ride it back, and then went inside to the freezer section to cool off. Hot and exhausted. And to be honest I didn't get back on that bike for weeks, maybe months. But when I decided later that I wanted to use a bike to get around, it was that ride that gave me confidence because as hard as it was, I did make it and I knew that I could do it again.
My surprise was after about three months it was getting easier, lots easier. I was near 50 by then and in terrible shape for decades; someone younger may expect faster progress. I take those same hills now near the end of 40 and 50 mile rides without any particular strain. My 8-mile commute consistently takes around 25 minutes, and less if I'm feeling good and pushing it. Not that I'm any athlete - it just that an ordinary person gets that much stronger, just by riding, but only if he sticks with it.