You are right, in that the surface of the Earth would quickly turn into an iceball.
But actually, the core of the Earth isn’t warm because of the Sun. It would take a slight amount of time for the Earth to freeze. The Earth is essentially a dirty bomb; The intense heat of its core makes Uranium and other radioactive substances react hotter, which in turn keeps it hot. The interior of the planet is thousands of degrees; the slight difference between 0 degrees and 300 degrees wouldn’t make much of a factor next to the thousands of degrees the Earth heats itself up to, for a very long time. And without convection, those 300 degrees would radiate their heat very slowly indeed.
>>>The interior of the planet is thousands of degrees<<<
Al Gore disagrees, it’s MILLIONS OF DEGREES!