you can add another criteria to the averageifs();

=AVERAGEIFS(D1:D4,E1:E4,"Junior*",C1:C4,"m")