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