How Do I Adjust the Depth of an Octagonal Junction Box?
Per Tyson's comment;  You should be able to move the box on the threaded nipple (pipe) that seems to be holding it to the hanger bar.

Loosen the nut, in the box,  down to the desired height.  Then tighten the one outside the box above it.  Since you had the ceiling open (at least when this was OP) that shouldn't be to hard.  Worse case you may have to back the wires out, remove the box from the nipple, and stack a nut up at the desired height and reassemble.