For that distance I would look into a Touring or Cyclocross bike with drop handlebars. I think 20 miles is doable on the right bike. On my hardtail I can only do about 3-5 miles without some discomfort setting in. On my touring bike I wouldn't have a problem. You may need to start off small by doing only half the distance at a time. Eventually you will work your way up to it without problem. Also knowing your budget might help with specific bike recommendations.
My suggestion to new bike purchasers is to test ride as many bikes as you can. When looking for my new bike (my touring is a little over a year old) I test rode every touring bike and cyclocross bike I could get my hands on. I eventually drove more than 3 hours away to test ride one that a shop had in my size. I started seriously looking around september and eventually purchased in december. Thats with some bikes being test rode more than once and notes taken on my part. Basically give yourself some time.
If you do go used have someone experienced help you out. For kicks and giggles I took a look at my local craigslist and couldn't believe some of the deals available (where were they when I was shopping). If you are unfamiliar with bikes sometimes it's buyers beware when you shop used.
Good luck and hope things workout for you.