Amazon selected New York City and Arlington, Virginia, as sites for the online retailer’s second and apparently third headquarters, ending a year-long search for a project the company says will produce 50,000 jobs and more than $5 billion in capital spending. In a twist, the company said it is also putting an operations center in Nashville, Tennessee.