IMO the only way to train for hills, without having hills nearby, is to get a smart trainer and use a virtual platform, such as Zwift. I find there's a mental component to riding long climbs that can't be replicated any other way. There's also the physical element to it, of course: cadence, power, bike handling, body position etc all contribute to the sensation of climbing that need to be practiced on the real thing.
All my opinion, of course.