Can I manually end a started ride before reaching the selected distance?

Yes, this is also possible. You can end your ride manually at any time (press the "End Ride" button). Manually and thus prematurely ended CHALLENGE rides are not shown in the rankings.