WASHINGTON — The Pentagon is weighing allowing some immigrants brought illegally to the country as youths to serve in the military, a unilateral step by the Obama administration as immigration legislation remains stalled in the Republican-led House.