Some people have already used green energy for mining and it needs very long time to return ROI that being used to buy the solar panel and all of things to build the green energy mining.
I think that this will never be profitable
"Never" is definitely too strong a word - see what is happening in the world: long time ago people realized that the transition to green energy is necessary. In my opinion currently the biggest obstacle is not economic - the price of energy from solar panels is dropping year by year, but more social and political: tens thousands of miners (and their families) in many countries are afraid of losing their jobs and governments, not wanting to lose so many voters, are afraid to introduce radical solutions enabling faster transition to the green page.
This year, many countries in the European Union have declared that they will switch to renewable energy sources in the next several dozen years. Did you know that, for example, in Germany in 2000, 6% came from renewable sources, and in 2019 their share increased to 44%, this year they are approaching 50%. Of course this process will start with richer countries, but this trend is already visible....
So it won't happen in year or two but in really near future....