That sounds doable. Buy the bike and think of it as motivation to improve your endurance. You might get a little sore at first, no different than how you get sore when you back go the gym again, but it won't last long. My first commute was 6 miles to school. I was usually able to make it back and forth but when I couldn't, public transportation was able to take me more than halfway home.
Just buy a nice bike and start riding it, more and more. Trust me. The difference in a quality bike will inspire you to ride it more. It's just more enjoyable.