The Army general in charge of the Pentagon’s failed $500 million program to train and equip Syrian rebels is leaving his job in the next few weeks, but is likely to be promoted and assigned a senior counterterrorism position here, American officials said on Monday.