Can't do outdoor training for 150km and only on trainer. Can anyone give tips and training plan?
Should be possible, but you are going to need a lot of dedication to sitting for hours on the trainer. You'll also need to put a trainer specific or cheap disposable tire on you bike as trainers wear rear tires fast.

The training you need to do depends on what your level of fitness is, the max distance you can currently ride and the nature of the 180km event (flat or lots of hills) and how you want to ride it (target average speed, how long you plan to take overall, number of stops etc.)

It will be easy to search for and build a training plan with 30-60 minute sessions 3-4 times a week that will increase your overall fitness and strength substantially. This should be your initial priority.

The difficulty will replicating the duration and nature of the long ride. I would not try to replicate the distance of the ride on the trainer, but instead the duration and intensity. Estimate the time duration you will take for the event and plan sessions on the trainer working up to about 75% of that, at your planned intensity.