Hi, you actually didn't go wrong at all! Your answer is actually the same thing as the "right" answer, that if X then D- the statements are contrapositives.
While it feels weird, a statement and it's contrapositive are the same thing, just written in different ways. I like to think of them as 1/4, .25, or 25%. It takes a bit of getting used to but either an original statement or it's contrapositive can be a valid answer.