Who is the manufacturer of the appliance?
Most will have a number of flue options.
I.e. one that can go up the wall and put the roof of your shed.
Then there’s the plume management type flues where the exhaust part is taken upwards.
First port of call is the manufacturer.
I did similar when I relocated my boiler from in a bathroom cupboard to in the loft, i.e. bought new flue to go through wall rather than vertically, they made all kinds of shapes and options for the flue
Then you should really get a gas safe to fit the new flue, however I suspect a gas safe would just condemn your fire and refuse to work on it aside from servicing, don’t think they are supposed to commission stuff that won’t meet current regs.