Normally you would crimp a new fitting on a new piece of hose and then crimp that to the old hose. Sometimes there is a proprietary fitting that has to be re-used and is welded to a new fitting on the new hose, I had to do that on my compressor fitting. Crimping a fitting on an old hose comes with the risk it will leak, but worth trying, mine has not leaked.
My heater line is a metal pipe from front to back with heater hose on each end.