One of JPMorgan Chase & Co.’s most senior executives is leaving the bank after a four-decade career, in which she most recently led its artificial intelligence drive from a coveted spot on its top operating committee.