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."