There is an option in MATLAB to imshow() that makes clear that the bwdist transform is NOT all-black.
Yes, you can scale the image by dividing by max(distance(:)); but you can also just:
imshow(distance, [])
The square brackets auto-scale the visualization.