The "Hotel Vier Jahreszeiten" turned down President Trump in April, as reported by Hamburger Abendblatt (paywalled, secondary quotation e.g. on The Local and Spiegel Online.)
Apparently the contingents booked by the Auswärtiges Amt (Department of Foreign Affairs) were already allocated otherwise when the US request came in, indicating that the White House staff was a bit late on the ball.
On 9 June, Bild reported that the Hamburg Senate has offered President Trump a guest house as accomodation. (Adblocker-blocked, also secondary quote by The Local.)
Subsequent reports about President Trump at the G20 summit, like this one by the Norddeutscher Rundfunk, also mention Persident Trump staying at the Senate's guest house.