Hi,
I am a bit confused. Maybe the wording is the culprit.
What you are saying - thing object for
displacement, "height maps" and
Z-Depth are different things and are to be set up differently.
What is the exact thing you want to do? Maybe describing that can help.
Maybe you are looking for Projection modifier (with texture baking probably), for getting a height map (and not only), projected from an object to a surface, in a given ranges?
For that, you can have a look at this e.g.:
For Z-Depth, I believe there are enough and plenty of options to properly have it baked.