A fire-damaged town centre building left empty for more than 20 years will be demolished by the end of next month.