The recommendation above from SlowAndSlower should work with a text editor. That would be the way I do it as well.
Another option is to use Garmin's BaseCamp
- Open the GPX file in BaseCamp
- You will notice the file contains waypoints and routes. The routes are usually at the bottom of the list
- Select each route and "Create Track from Route"
- Once you have the tracks, select all of them and select to "Join Tracks"
- Export or save the final track
This option gives you the opportunity to edit the route in the software while you are at it.
Note that "Tracks" are different from "Routes" in GPX language, especially with Garmin, as there are limits to each. In general Tracks work more universally and reliably. Routes are more suitable for devices with maps to give navigation prompts.
You can convert between both as you need.