Nuclear survivability is weird. See Akiko Takakura who survived the Hiroshima bombing with essentially nothing but minor cuts, bruises, and burns (requiring minimal medical intervention) due to the pressure wave and heat despite being less than 1/4 mile (300m) from the center of the Little boy explosion and well within the supposed "lethal range".
What she had going for her was that she was inside a reinforced concrete structure (in the lobby of the bank of japan) and not standing directly near any windows or doorways. That she wasn't crushed or injured by damage to the structure was the true stroke of luck. The people who were inside and away from windows or doors were largely safe from the unique threats of the bomb (fire, radiation, pressure wave) but were still subject to the extreme lethality of being inside a large stone or concrete building that has been largely destroyed by a bomb.
Also she limited her exposure to radiation contamination by getting out of the city ASAP and not drinking the contaminated water. As a result she didn't even suffer radiation poisoning I believe.
With modern knowledge of nuclear attacks, the survivability seems a lot better. If you happen to be in a good, sturdy concrete building (which many are nowadays) at the time of the blast and you don't succumb to mechanical trauma that renders you unable to escape, your odds are quite good if you follow some basic rules:
1. Cover your airways with a mask or at least a rag to reduce dust and particle inhalation.
2. Avoid drinking or eating from unsealed sources where possible. Doubly so for uncovered sources. i.e. bottled water (or anything else sealed) is best. Liquid in an unsealed container is OK even if it isn't ideal and water from open bodies of water or the rain is very very bad.
3. Get out of the immediate disaster area and find a gathering point for medical attention, evacuation, and relocation.
4. Maybe keep some iodine tablets on you to help protect your thyroid (however this is really only a concern for reactor failures and only minimally so for bombings). Take within less than 4 hours and once every 24 hours after that.
If you are in a good position at the time of the blast and you can do those big 3, you have really, really good odds for survival. If you are lucky enough to be able to check box #4 as well that's just a nice bonus.