How are selected the features for a decision tree in CART?
At each split point, CART will choose the feature which "best" splits the observations. What qualifies as best varies, but generally the split is done so that the subsequent nodes are more homogenous/pure with respect to the target. There are different ways of measuring homogeneity, for example Gini, Entropy, Chi-square. If you are using software, it may allow you to choose the measure of homogenity that the tree algorithm will use.

Distance is not a factor with trees - what matters is whether the value is greater than or less than the split point, not the distance from the split point.