£10m scheme to transform derelict listed building in York