Here's the relevant rules section, with one important rule highlighted:
- - -
Forced Marches and Rides
A forced march consists of an accelerated pace for an exceptionally long time – instead of spending 8–10 hours traveling at a reasonable pace, a forced march or ride might require the characters or mounts to travel from first light to complete darkness at a quick pace. During forced marches you cannot take long rests.
If the forced march continues for a number of days beyond your Constitution modifier then you must make a Constitution saving throw each evening with a DC equal to 5 + the number of days force marched so far. On a failure you gain a level of exhaustion. If it is a forced ride then your mount’s Constitution modifier is used and they must make the saving throw instead.
- - -
Recovering from exhaustion does require a long rest and you must eat and drink, which of course could be another factor on a long trip if you have to rely on supplies rather than foraging.