I have an HP Pavilion 23-b020a All in One desktop with a built in DVD Drive. I changed the 3.5" hard drive to an 2.5" SSD by connecting it to the connector and taping the SSD in place. Since then it has been almost impossible to eject the DVD drive without pulling on the edge of the tray with my finger to open it. What could have caused the DVD drive to stay stuck? Closing it is no problem and the DVD drive works perfectly otherwise.
Looking at the manual for the AIO system, it's probable that the ODD's tray/bezel might be impeded by the bottom housing for the AIO. Might want to see that the cover that you'd taken off to get to the innards is reseated properly. As for the AIO, if you didn't need the ODD, I'd have suggested that you get a secondary caddy and drop an SSD into that in place of the ODD and keep the HDD intact.