FedEx Corp. confirmed on Wednesday it would terminate its contract with Amazon.com Inc. for ground delivery of small packages as the online retailer focuses on building out its own delivery network.