It's strange that the Night King wasn't harmed when the dragon spit fire at him in Game of Thrones S08E03, because Valyrian steel killed him and what makes Valyrian steel different from regular steel is that it is originally made from dragon's fire. So it would seem that dragon fire would be more effective. Unless I'm wrong about this.
Out of universe reason.
As explained in the inside the episode, if the plan worked, that would have been dull.
"We thought it was important that whatever the plan was it doesn't just work because that would be dull.
"There's no reason to know for certain that the fire wouldn't kill or destroy the Night King, but there's also no particular reason to believe that it would.
"Then a few moments after this happens, the Night King brings them a whole larger undead problem by taking all of their own who have been killed in the course of this battle and turning them into the enemy."
So, David Weiss believes that there is "no reason to know for certain that fire could kill the Night King."