Even if a black hole with the same mass as the sun were to replace it, Earth and the other planets would orbit the black hole as they orbit the sun now and not get sucked in.