Thanks for reaching out and sorry for the delayed response.
I'm afraid that you cannot replace the batteries for the Nest Thermostat E or Nest Learning Thermostat. Instead, you can try to charge the thermostat with a USB cable.
Google Nest Help Center
Chromecast Help Center