Miles is plural. (But we say 0.5 miles and not 1\2 mile, we say 1\2 a mile. Even though they are mathematically the same quantity. Because while saying “half a mile” or “quarter of a mile” we are referring to the quantity “one mile” first.)
We do say
It is miles to the next gas station.
because here, “is” refers to the object “gas station” and not miles.
Now while expressing conversions, even if it were kilometers we would say, 10 kms is 10,000 meters. But that doesn’t make it any less plural. Because “10 kms” here is being treated as one unit. E.g.: “10 miles is a long way to go” here as well “10 miles “ is being treated as one unit, “X is a long way to go”. Hence under such circumstances we tend to use “is”. In many other cases as well,
5 apples is all I need.
10 cases of wine should do.
In these cases, when the word mile is part of a phrase occurring before (i.e. pre-modifying) another noun, it will usually be singular. Otherwise it will be plural. – Araucaria - Not here any more. – 2016-10-12T12:29:43.263
2
Related: http://ell.stackexchange.com/questions/6434/a-ten-years-old-boy-or-a-ten-year-old-boy (i.e., He's ten years old. He's a ten-year-old boy.)
– Damkerng T. – 2016-10-12T12:58:26.6272A 26-mile race. – Khan – 2016-10-12T14:57:55.457