Does word "range" have the same meaning in the following two sentences?

We hiked through the Andes mountain range.

The valley was between two ranges of hills.
the same meaning