The man, who was not identified, is the third homeless person to die in Massachusetts as a result of fire this year, state officials said.