Depends on their current area of expertise. For example, I know a lot of chemical engineers who work in the oil/gas industry, maybe they can be retrained to work with other materials e.g. new battery materials. They can be given an option to get a government paid masters degree (usually 1-2 years). Construction workers can be offered training to build e.g. windmills rather than pipelines. Coal miners can be offered training in trades as e.g. plumbers or electricians. If they want to advance further in education, they should be given an opportunity to do so as well. If a highly motivated, high-school educated miner wants to be an engineer, for example, he can be offered an opportunity for a government subsidized college education at a participating college.
The transition needs to be an opportunity instead of a punishment. It's still up to them to take advantage such opportunities, but the government should make it easier for them to do so. What we did with globalization--"You lost your car plant job? Tough luck!", is only gonna lead to disaster.