U.S. Defense Secretary Robert Gates announced Tuesday he would replace McKiernan , who served as commander of U.S. forces in Afghanistan for about 11 months , with Army Lt. Gen. Stanley McChrystal , a special forces officer who oversaw several high-profile raids in Iraq .