Hello, I haven’t done this, but really what matters is the specs of the two units. Do they have similar specs, so the vent is properly sized for the BTU capacity of the heater? Both condensing or non-condensing? Both need the same size gas supply?
I am curious, why are you replacing the unit?