Lack of sunlight and sunheat = death

If the sun were suddenly replaced with an object of approximately equal mass and size that did not emit light or heat, what would happen to the earth? How long would life be able to sustain itself?

Hm. I was thinking, at least the creatures that live off hydrothermal vents in the deep ocean would be able to survive for billions of years, but a quick search said:

“…such [hydrothermal] ecology as exists on Earth depends largely on oxidants that filter down from the surface of the ocean…” (BBC News).

Would this process maintain without any kind of surface life? Or could evolution make those oxidants unnecessary? I suspect that would be life’s only hope.