What I would suggest is to cut that stub of vertical pipe in half, cleanly. Get a "Fernco" rubber coupling, the kind w/o the stops in the middle. Use that at the joint. That will allow you to effectively lengthen the stub of pipe sufficiently in order to "bottom it out" in the similar style rubber reducing coupling on the top of the blower assembly. Ensure that all of the band clamps are tight.
You don't mention where your CO detector(s) are located, but as a home inspector I'll tell you that best practices indicates they should be 15-20 feet away from any gas appliance such as furnaces, fireplaces, water heaters, etc. If you have a utility area where such appliances are located, perhaps one detector in the basement utility room would suffice. If you have gas furnaces in the crawl space or attic, perhaps one 15-20 feet away from these furnaces would be useful. That spacing is to ensure that you don't get nuisance alarms. Of course, your smoke detectors should be of the dual CO/Smoke variety. Note also that modern devices generally have a 10 year lithium battery, but they also have a 10 year life. Replace them all at the 10 year mark. Never rely on one unit, just like smoke detectors. Best practices have them in each bedroom, and outside bedrooms too. My own home, a 2019 build, has a combination CO/Smoke inside the first floor primary bedroom, and one immediately outside. Upstairs, there's one in each of the bedrooms, and one in the hallway that serves all the bedrooms.
While I believe that any/all exhaust from any gas appliance can and does contain some CO, it's far more dangerous and concentrated when said appliance is suffering from incomplete combustion. So provided there's enough fresh air for complete combustion on your water heater, AND no other overt problems with the burner or installation, it's quite possible there simply wasn't sufficient concentration of CO to set off your detectors. If in doubt, throw it out and replace.