So the answer here is incorrect
https://vexforum.com/t/ultrasonic-rangefinder-displaying-a-0-in-digital-port-8/36666/1
You are correct in thinking it is a digital port. It is an easy mistake to make because most people think of analog sensors as having more than 2 options. The ultrasonic sensor runs on 2 digital ports and actually uses the time it takes for the input digital port to be activated after the output pin was actived. A lot of ultrasonic sensors actually are analog and have the sensor do the timing but this is NOT the case with the Vex sensors.
If I had to guess your problem is that you need to flip the wire. One is output and the other is input, remember the labeling is from the sensors point of view.
Input is the cortex’s output
As a rule of thumb avoid using both port 4 and port 11 for encoders or ultrasonic.