York’s oldest surviving railway structure is set to be restored by Network Rail as a brass band rehearsal space.