I don't think you can fully compensate for elevation gains (climbing) without some actual climbing...
Are there any small hills, multi-story parking garages, or anything where you could do some climbing laps, at least? Off-road hills on a mountain-bike with bar-ends?
I think some combination of longer rides, intervals, sprints and/or added weight (pull a heavy trailer) should help you get the basic cardiovascular and leg components of hill-climbing. Some planks or other exercises to improve your ability to transfer power between arms and legs should help, too.
When going up a hill, it can be challenging to keep your effort level the same as when you were on the flat. If you increase your effort on the climbs, you're likely to tire quicker. At the very least, you may be exceeding the effort levels you were training at. Managing your effort levels on hills takes some experience that may be hard to acquire without some decent length climbs.
When you go up a hill the bike is tilted nose upward, and you have to compensate for that by moving your weight forward or pulling yourself in, or you lose a lot of power. If you get off the saddle to stand up to shift your weight forward, the bike shifts back as you stand and the bike moves forward/aft and laterally as you move. A stationary bike with the front up on blocks might help you with some of that, but a real bike moves under you and those gym "bikes" can't.
When you go up a steep hill you end up going a lot slower, and it's helpful to have practice with balancing at speeds barely above walking speed while putting a lot of effort into making the bike move forward. Balancing a bike that's going slowly without you working hard isn't nearly the same thing. Without that practice, you're more likely to have to get off and walk.
There's different variations of "shoelacing" or "switchbacking" you can use on hills when your lowest gear isn't quite low enough. Either taking a large zig-zag pattern to get a less steep (but longer) effective climb, or weaving the bike while your center of mass keeps to a relatively straight line so that the rear wheel takes a longer path and emulates a lower gear. I can't imagine practicing any of that without an actual hill.