UndercoverElephant is correct in his assessment. Affirming the consequent looks like this:
If A, then B
B
Therefore, A
That is invalid because there is no reason to think that A is the only thing that could cause B. Here it is in plain English:
If I've won a million dollars, I will travel this year.
I am travelling this year.
Therefore, I've won a million dollars.
Even though it is true that I would travel if I've won a million dollars, I might travel for other reasons as well. Simply knowing that I'm travelling is not sufficient to know that I've won a million dollars.
However, here is the OP's argument:
If A, then not-B
B
Therefore, not-A
That is valid because there is no way to affirm B without rejecting A. The two are mutually exclusive in this argument. Here's a plain English example:
If I've won a million dollars, I won't ask for money
I will ask for money
Therefore, I have not won a million dollars
That is valid because, per the first premise, there is no way that I will ask for money if I've won a million dollars. Therefore, if I'm asking for money, I have not won a million dollars.