Isn't the Turing Machine the computer that Alan Turing invented to crack the German Enigma during World War II?
No. Absolutely not.
Your question addresses two very great accomplishments of Alan Turing, but they are really quite unrelated.
Alan Turing made several significant contributions in the field of mathematics, but he is best remembered for the following three major accomplishments:
1. The Turing Machine
2. Cracking the German Enigma
3. The Turing Test
All three of these achievements are historically very important, but they are really quite independent of each other.
2. Cracking the German Enigma
3. The Turing Test
Version 1.0 -- April 23, 2017