You could try adding extra column to x-axis and use that same column for color

Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(
Variables(X(:age), X(:sex, Position(1)), Y(:height), Color(:sex)),
Elements(
Box Plot(X(1), X(2), Y, Legend(3)),
Points(X(1), X(2), Y, Legend(4))
)
);
-Jarmo