Actually the z-depth data is in there, but it’s contained in a 32-bit image, and you’re only seeing a limited range of that image. As I suggested earlier, try running it through a “Normalize” node, which will sample the darkest and lightest values and “stretch” the blacks and whites to fit nicely into an 8-bit image:
Keep in mind that this will dynamically update, which means if your camera moves closer to the box (or the box closer to the camera) the z-depth info will look more or less the same. If you want to manually set the range of z-depth representation, fiddle around with the “Map Value” node:
Basically, the “Offset” determines where you “center” the depth, and the “Size” determines how much range will be used to fill the grayscale range (smaller numbers equal a larger range). Good luck!