The correct option is (D) why he wasn't playing with his friends.
(Indirect Wh-questions use reporting verb + question word + subject + verb order, without inversion.)
For reporting a Wh-question, the structure is: asked + question word + subject + verb (no inversion, no auxiliary before subject). Option (A) uses "whether" (wrong — that's for yes/no questions). Option (B) uses "that" (incorrect connector for a Wh-question). Option (C) keeps the inverted word order ("wasn't he") which is wrong in reported speech. Option (D) correctly follows the indirect question structure.