John Walker Lindh, the young Californian who became known as the American Taliban after he was captured by US forces in the invasion of Afghanistan in late 2001, is set to go free after nearly two decades in prison.