Moody's Challenge
When reach Moody's challenge after the second task, he will ask you to face creatures that you already know of, and to not repeat spells that you have already used. Immediately after you complete Moody's challenge you will go to the third task. You can then defeat Voldemort after the third task.