For me upright bikes are *the* most comfortable bikes for very short distances at speeds of 15mph or below. That's why my 'grocery getter' and around the neighborhood utility bike is an upright bike.
Once you start wanting to ride a longer distance at faster speeds, then drop bar bikes start to make sense. To take it a step further, TT bikes are even more comfortable for longer distances because you get to rest on your elbows, but the downside is that they are harder to maneuver.
For the distances you're talking about, 5km is fine on an upright hybrid bike. 18km is doable also, but at that distance the drop bar bike would probably start to be more comfortable.