He didn't exactly let the Dragon get close to him though, he downed it and didn't get a direct blast of fire
They established that Dragons could be hurt a long time ago, and reminded everyone of it two episodes ago so it shouldn't be too surprising that some mystical death machine could take one down. There was no urgency from the White Walkers, they didn't fear the Dragons so maybe the fire can't kill them either
The White Walker that Jon killed at HardHome actually looked more surprised that he blocked his ice pick than any of them seemed by the Dragon attack.