|Look at the syntax of the formula:|
AVERAGEIFS( average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ... )
Now look at the syntax of your formula:
What column are you trying Average?
I don't think it's Column D.