The largest four digit number having distinct digits is:
9000
9786
9867
9876
We know that, the largest four digit number is 9999
According to the question, digits should be different, so the largest 4-digit number will be 9876.
Hence, option D is correct answer.