Make sure you entered the correct code. This error can be triggered by the cached data on Steam. Restarting your PC, and clearing the Steam cache should solve the problem.
Also you can easily get confused by some letters and numbers. Please try the below suggestions to ensure that you are entering the correct code: the number 0 (try entering the letter Q, O, or D instead); the number 1 (try entering the letter I instead). Check instances of the following pairs to ensure these characters are not being confused: the letter B and the number 8; the letter G and the number 6.