Amazon’s termination of the lease for the 17,000-square-foot space comes five years before it was due to expire.