It seems, you missed some scenes or you watched it long back so here is a little flashback as it is shown in the movie.
In the movie, he regains his memory, but is suffering from post-traumatic stress disorder and is not fit to stay, so he is shipped back to Vermont (probably his home in USA) and is trying to pick up a ride on the road, where he meets a stranger, who gives him a ride and then a cop pulls them over. After that the scene is skipped to the court room, where we find out that the cop who pulled them over is killed and he (Jack) is being charged with his murder, he doesn't have any memory of what happened after cop pulls them over. There is no mention of the stranger who gave him lift at this point.
So yes, according to one of the interpretation of the movie (there are 3, read here --> imdb), he regains his memory after being shot.