Not only legally
Legally - Germany has no binding obligation to keep US forces within its territory indefinitely.
You can kick the Americans out unilaterally, and there's nothing they will be able to do about it. In some instances, you may have to provide a notice ahead of time, or instead simply refuse to renew an agreement when it expires.
Lots of countries have kicked out American forces. The Philippines, Thailand, Libya, Uzbekistan, but most famously... France!
Charles de Gaulle withdrew France from NATO's integrated military command and then demanded all foreign troops leave French soil. And they left.
The US and NATO were forced to relocate all their sh*t to Belgium and West Germany. Even after France rejoined NATO command in 2009 - no US troops returned, and there are none to this day.
Germany frankly hasn't the means if Washington would just say "no"
Look, despite various recent events, we still live in a world of laws.
There is no circumstance under which Washington is able to just say "no". That would trigger a major diplomatic scandal, and likely cause a wave of backlash among other NATO allies. I bet everyone, from Japan to Bahrain would feel a chill, if they realized they cannot kick the Americans out even if they try.
America is free to pull out all the stops in trying to pressure you to reverse your decision, but it cannot outright refuse to comply. Then that would be what we call an "occupation" - and a major impingement on your sovereignty.
America has a big toolset it can use to "punish" you, of course. If you look at France and Turkey, you can see what America does when somebody begins to act too independently:
1) They start restricting arms sales to your country. Want an F-35? Tough luck.
2) They'll suspend intelligence sharing and any inter-military cooperation.
3) They'll pressure you diplomatically, trying to isolate you, by telling others to avoid doing business with you. They'll use the media to paint you as a freeloader, and your leadership as fundamentally irresponsible.
4) They'll support your opposition parties, giving them an international platform by hosting them in the White House and allowing them to address Congress.
5) They'll cut all your aid and grants - if any such exist.
6) They'll introduce tariffs or tear up trade deals.
7) If they are really angry - they'll start targeting your financial system.
8) If they are really, really, really angry - they'll deploy their whole covert toolset against you. Cyber strikes, psychological operations in social media, and false flags.
That's it! If you can resist all that - YOU CAN BE FREE! That's the maximum extent of what they are capable of.
So if you have the balls to stand up and leave, like De Gaulle, it is possible to do so. People have tried, and survived.