How to create solid height field from image?
You can still use the displace modifier for this, but with a vertex group to limit the influence to one face of your object.


Select the top face of a cube/suitable volume.
Create a vertex group in Properties > Object Data > Vertex Groups.
Assign the selection to the vertex group.


Then specify that vertex group in your displacement modifier: