Profit per unit time is a tricky thing to calculate. It depends on the operating cost and amortized purchase price of the vehicle, the speed of the vehicle, the cargo capacity, the time spent loading/unloading it, the payment rate for the cargo, the inflation rate (operating costs increase faster than cargo payments). Interestingly, the late delivery penalty doesn't factor in under normal circumstances: it takes exceptionally long loading times for optimal routes to become long enough for it to matter.
I've run some simulations. In general, the faster you can load the cargo, the shorter you want the route to be. If you could load and unload instantly, the optimal distance would be however far you can travel in the "early delivery time" in this chart; for reasonably quick loading (30 days or less) and realistic vehicle capacities, the travel time is no more than a day or two longer.
Inflation causes the optimal route length to increase over time: for example, at the start of the game the optimal travel time for a Goss Grain Truck that can load in 30 days is five days, but 100 years later it increases to 10 days.
All this is assuming the default vehicles. Many of the popular alternate train sets have trains that cost more to operate when moving than when loading, which further discourages long travel times.