It is a wonderful trope, going back in time to kill Nazis. They've long served as one of the greatest villains for us, the closest thing to serve as a shorthand for evil. It may surprise you, then, to hear that the British had a plan and opportunity to take out the leader of the Third Reich, but didn't.
Conceived by the British Special Operations Executive (SOE), the plan was formulated in 1944. The plan would likely have been enacted during Hitler's July visit to Berghof. After considering bombing his train, they decided that utilizing a sniper would be a better and more likely to succeed.
The plan was, in essence, to fire from a distance to kill him during his morning exercise. A team of a Pole and a British Sniper were going to be dropped in the nearby area in German uniforms.
There was also a local recruited to the plan, a man from Salzburg (20 km away) who was vehemently anti-Nazi. He regularly trained at a shooting range, ostensibly able to help out with the plan.
Though submitted in November 1944, the plan was never carried out. Top strategists pondered whether killing Hitler would have been a good idea. There were various arguments raised about it; some argued that Hitler could have become a martyr for the Nazi cause, while others pointed out that he was an atrocious strategist and nearly any replacement would have been better. That being said, with the hindsight we now have, there may have been more successful efforts to end the war earlier. With the stated goal of destroying Nazism beyond just killing Hitler, this plan was never carried out.
Just over six months later, Hitler committed suicide.