The U.S. military has completed the transfer of thousands of Islamic State group detainees from Syria to Iraq.