John Walker Lindh, the American captured in Afghanistan in 2001 fighting for the Taliban, was freed early from federal prison on Thursday after serving 17 years amid concerns he might still harbor extremist views.