Is riding on hilly road better than flats for long distance training?
Better? Don’t know. Useful? Yes. 

One way you can use the hills to your advantage is to get your heart rate up. A good workout could be 4 minutes riding hard, then 3 minutes recovery, repeated 4-5 times. Riding hard means getting your heart rate up pretty high (171-180 for me) and this happens naturally and more consistently when you’re riding up hill. It’s also straightforward to do on the turbo.

https://www.ncbi.nlm.nih.gov/m/pubmed/17414804/

Maybe you can find a route with a few medium size hills that take a few minutes to climb, or ride up and down the same hill. 

If you warm up riding gently for 15-20 minutes before and warm down for 15 mins after, for example, then you’re likely to cover around 20km in around one hour. 

Of course it is still necessary to do a long ride every week for the training adaptations and to practise nutrition strategy, building up the distance weekly.