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