I've been doing a lot of research about this matter ever since I saw a TikTok debating it a few weeks ago, and I'm seriously confused.
Stephanie Dalley from Oxford has suggested that they weren't located in Babylon, but rather in Nineveh, a city that was once called Babylon, as there is a lot of evidence for an extravagant garden having existed there.
However, Eckhart Frahm from Yale disagrees and considers Nineveh's gardens to be a separate entity, as an inventory describing numerous exotic plants was found in Babylon, suggesting that the Hanging Gardens truly were located there.
However, this contradicts with every other claim I have seen, which all say that there has never been any historical evidence for any gardens in Babylon. This relates to the theory that the Hanging Gardens never even existed, and were just a fantasy of Greek historians romanticizing the Middle East, which is the theory I believed in for the longest time.
Is there a definitive answer?
Hi, this older answer by u/mythoplokos may be of some interest: