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