Considering where car manufacturers are now with their electric platforms I think 10 years from now would be ok and 5 years possible. Sometimes you just have to rip off the plaster.
You get the batteries and the renewable energy by building factories that produce batteries and by building wind turbines and solar panels. It's not rocket science.