The Avid hoses have a factory press fitted banjo. You cut this off and you can't re-fit it.
To shorten it you need to do it at the lever end.
If you fit braided hoses you can shorten either end as they use screw fittings.
You can get a new olive and insert from an LBS or CRC or indeed you can post in the Classifieds for a kindly member to send you a couple.
Instead of threading it through the swing arm my friend (Mandog) has fitted M-Part stick on hose guides on top of the swing arm on his Patriot and it looks quite neat. Although the cost of that is more than an olive and insert.