The B-listed building had become dilapidated, but will now be upgraded into luxurious flats