Also, in the German climate and with its many 'old' buildings, merely switching the heat source won't do. One also needs additional isolation, and new radiators.
[1] https://www.cleanenergywire.org/factsheets/heating-40-millio...
Who's talking about a year or two? Germany has been pushing for russian gas since the 90's, against all logic.
If we had more nuclear power, this wouldn't change much, if anything
And you may have noticed that Russia is not cutting off delivery of Russian gas to Germany. Which they would if the damage was unilateral.
Also, electrical heating is one of most wasteful and damaging ways to do heating, and Germany has been moving away from electrical heating for this reason for decades now.
Not disagreeing with the rest of the arguments, but electrical heat pumps are actually the most efficient way to heat your home (theoretically you can get about 5 W of heat for every 1W of electricity, for practical ones it's a bit more than 3W IIRC).
That said, it's not trivial to convert old houses to use heat pumps. Cost is one issue, but they typically require better insulation because they don't have the same power that you can get with a gas heater.
What if the EU had not bought Russian gas? Then Russia would probably have sold more to others like China or India and Ukraine would not have earned money from transit fees, nor would there be any leverage against Russia at all.
Also If EU did not buy Russian gas and China and India were the only buyers then that lowers the price and profits Russia commands. In a liquid marketplace the number of buyers available contribute to profits.
Providing the electricity for those pumps is the easy part of the problem. That just requires doing a bit more of what they are already doing at scale, which would be installing wind and solar all over the place.
In any case, not all heat pumps are that expensive, and it is also possible to have hybrid heat pumps and air conditioners.
Had Germany decided to phase out natural gas for heating in 2014, and replace it by nuclear power, ovens and heat pumps would definitely be able to keep up with the reactor build rate.