North Yorkshire country house and former public school is set to be converted into luxury retirement apartments.