How could a navy build a battleship able to withstand a nuclear weapon?
Short answerIt could not do so in any practical sense; even extreme lead protection would not remove the destructive effects of the explosion and would create an unusable ship.
NotesA genuinely nuclear-proof battleship cannot be built. Surrounding the ship with an extreme amount of lead would still leave the explosion itself as a destructive problem. The weight and material required would also make the vessel impractical before it faced combat. Conventional armor logic reaches a limit where it no longer produces a viable survivability solution.