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