Thanks for writing in.
No, distance doesn't matter a lot while choosing a hospital for pregnancy
whichever hospital is best in your view , you can choose that.
Distance matters on your health condition,complications and at the time of your delivery.
Hope I have answered your query. Let me know if you have any more concerns.