Idiomatic use of 距 and 離 As I try to read Chinese articles, I begin to encounter 距. Some examples are:

该列车用的是世界最先进的100%低地板技术，车辆地板距轨道面仅35cm (TCB).
飛機於距地面一千米處爆炸 (Pleco).
天津距北京約有一百二十公里 (Pleco)

Is 距 preferred in written Chinese? Is it preferred for vertical distances?
I also found an example that might suggest the two are absolutely interchangeable.

距市中心不远的地方就是可以独自滑雪或漫步的林地区域。(Youdao)
距, 离 and 距离, these three can be replaced with each other and would Not change the meaning.
But 距 is slightly more formal, but only slightly. In speaking, 离 and 距离 is used more commonly.

However, they are used when expressing distances, doesn’t matter whether vertical or horizontal, you can use either of these three words