With more people choosing to buy books online, a Barnes & Noble on the Upper West Side prepared to close early next year.