Consider the set of real numbers, $\mathbb{R}$. As far as I understand, it is a metric space in that it has a distance function defined on it $$d(x,y)=\lvert x-y\rvert$$ with $x,y\in\mathbb{R}$.
Intuitively, $d(x,y)$ quantifies the "distance" between two numbers $x,y\in\mathbb{R}$. Furthermore, given that $d(x,0)=\lvert x\rvert$, one can think of a number $x\in\mathbb{R}$ as being $\lvert x\rvert$ units of distance from the origin $0\in\mathbb{R}$ along the real number line.
Now, if one considers a finite subset of the real numbers, for example, $\lbrace 0,1,2,3,4,5\rbrace\subset\mathbb{R}$, then the distance between any two elements is one less than the number of elements separating them. By this I mean, for example $$d(5,1)=\lvert 5-1\rvert =4$$ but the number of elements separating them is 5 (if you count the end points).
My question is, for a finite set of numbers is there any relation between the number of elements separating any two elements in the set and the distance between them?
When we talk of a set, we do not consider the order, so $\{0,1,2,3\}=\{1,3,2,0\}$ and you can't define the distance that way. If you use parentheses instead of braces you get a sequence, which does specify the order of the elements. What you are really defining is a distance on $\Bbb N$, where you are looking at the index of the element in a sequence. This is the usual distance on $\Bbb N$
Your example depends on the fact that the numbers in your sequence are consecutive integers. What is the distance between $1$ and $5$ in $(0,1,3,5)$? You can certainly define a distance the way you suggest on any given sequence, but the distance between $1$ and $5$ will vary depending on the sequence. In this example it would be $2$.