WASHINGTON — President Biden vigorously defended his decision to end America’s 20-year war in Afghanistan on Thursday, asserting that the United States can no longer afford the human cost or strategic distraction of a conflict that he said had strayed far from its initial mission.