Here is a very Simple Solution :
SUMMARY :
When Initial Window + last window = 2km, either both widows are 1km or one is less & the other is more , in which case , there must be some Intermediate Window where the continuous window Distance $D(t)$ changes over , via becoming equal to 1km.
DETAILS :
Let us take a sliding window of 1 hour duration : $(t,t+1)$
That window starts at $t=0$ ( window is $(0,1)$ ) & ends at $t=1$ ( window is $(1,2)$ )
Let Initial window have Distance $D(t)$ less than 1km.
When window moves forward by small $h$ then new Distance ( within that Window ) will vary to $D(t+h)$
Due to continuity , Distance might either become exactly 1km (& we are DONE) or be still less than 1km.
Eventually , we will reach the last window $(1,2)$.
When that window still has less than 1km , then we see that total Distance traveled is less than 2 km (Initial window + last window)
Hence that last window must be 1km or more. Else there is a Contradiction.
Hence , we must have some Intermediate Window where "$<1km$" change to "$>1km$" , or rather that Intermediate Window must have "$=1km$".
DONE
We have similar argument when Initial Window is more than 1km , where some Sliding Window must have 1km. When all Intermediate Windows are still more than 1km , then the last window must have 1km. When last window still has more than 1 km , total Distance is more than 2km which is a Contradiction.
We are DONE with all Cases.