The calculated distance (air line) between Portsmouth and Gosport is approximately 2 miles respectively 3 kilometers.
By car or train, the actual journey to Gosport is certainly longer, as only the direct route (as the crow flies) between Portsmouth and Gosport has been calculated here.
Air line (approximately)
3 kilometers
1 nautical miles