In sentences with "to be" as the main verb, and in which both the subject and the subject complement are noun phrases, it isn't always easy to decide which is which.
In the example, "ten miles" can certainly be the subject of the sentence as much as "a long way to walk" can.
Haogide is right in...