Maybe this will help. If D was the correct answer, this is an example of what the front and end views could look like:
In the top view of answer choice D, there is a vertical line running through the front piece of the figure that represents a height change taking place. This height change would have to be indicated in the front view and end view. The absence of any change in height of the front piece in the front and end views (of the original question) means that it's invalid as an answer choice. In the modified answer choice above, I've shown what it would have to look like for answer choice D to be valid.
In the original figure's front view, the front piece has a vertical line - not a horizontal one. This tells you that from the top view there is a change in
depth, not height, taking place