The correct answer is D. We discovered that Candy will do anything but work.
In sentences A, B, and C, the word but is used as a conjunction - it connects two independent clauses within one large sentence. However, in example D, the word but is used with the meaning of apart from which is a preposition, so but also functions as a preposition here.