Turnpike Phenomenon in Metric Spaces