So the scene was a person (can’t remember if it was a man or women) is being shot at and they travel back in time to cause the bullet being shot at them to be a dud. I remember something with a fly going into the bullet as it’s being made in the factory.
Sounds similar to a storyline in the final season of Fringe.
John dies at the end is the movie you are thinking about.