2. If A lies, then B is not the murderer.
B is the truth, then D is the murderer. C lied again, so C is the murderer. Because there is only one murderer, B is a liar.
C is telling the truth, then D says B is lying, then B is telling the truth, which is contradictory, so C is telling a lie.
As can be seen from the above, Ding is telling the truth, then C is lying, then C is the murderer.