The U.S.-led coalition in Afghanistan formally ended its combat mission on Sunday, more than 13 years after an international alliance ousted the Taliban government for sheltering the planners of the Sept. 11, 2001, attacks on American cities.