Prince William's right-hand man and royal equerry is stepping down following four years of service.