The calculated distance (air line) between Jeddah and Mecca is approximately 41 miles respectively 67 kilometers.
By car or train, the actual journey to Mecca is certainly longer, as only the direct route (as the crow flies) between Jeddah and Mecca has been calculated here.