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