A malfunctioning heater has been blamed for the fire that filled a high-rise apartment building on Sunday in New York City’s deadliest blaze in decades.