I'm looking for a movie that is set in some kind of war zone. I feel like some sort of sniper guy is hunting another one and they are both extremely professional. It's a weird kind of killing job or something. The hunted guy is helped by a woman and boy living in an apartment. The boy gets used for sending messages. The end is on an old stationary train or something similar and the hunted guy dies (maybe) and the killer finds out about the boy and tries to kill him.
The boy gets used for sending messages part suggests you're probably after Enemy at the Gates. Below a few plot fragments matching your description:
In 1942, Vasily Zaytsev (Jude Law), a shepherd from the Ural Mountains who is now a soldier in the Red Army, finds himself on the front lines of the Battle of Stalingrad. Forced into a suicidal charge against the invading Germans by barrier troops, he uses impressive marksmanship skills—taught to him by his grandfather from a young age—to save himself and commisar Danilov (Joseph Fiennes).
Vasily is transferred to the sniper division, and he and Danilov become friends.
With the Soviet snipers taking an increasing toll on the German forces, German Major Erwin König (Ed Harris) is deployed to Stalingrad to take out Vasily and thus crush Soviet morale. A renowned marksman and head of the German Army sniper school at Zossen, he lures Vasily into a trap and takes out two of his fellow snipers, but Vasily manages to escape.
Sasha, a young Soviet boy, volunteers to act as a double agent by passing König false information about Vasily's whereabouts, thus giving Vasily a chance to ambush the Major.