You might be thinking of radioisotope thermoelectric generators. Those can be useful for generating relatively small amounts of electric power in isolated areas. But they're very inefficient and can't scale up to the level required to propel large ships. The risk of contamination from a sinking would still remain. So not a realistic solution.