WASHINGTON—Lt. Gen. Scott Miller has been chosen as the next commander of U.S.-led forces in Afghanistan, according to senior military officials, after two years in charge of the military’s secretive Joint Special Operations Command.

Gen. Miller, a decorated special-operations soldier, will be the ninth U.S. general in 17 years to take charge of the war in Afghanistan and the first to be appointed under President Donald Trump. The Pentagon declined to comment until the decision is formally announced.

As...