Amazon.com Inc. plans to eliminate roughly 14,000 corporate jobs just months after Chief Executive Officer Andy Jassy warned that AI will shrink the company’s workforce.