Dependent joints are not available in the Logic Block to use with a Joint Distance Sensor.
This is working as designed.
Whether Linear or rotational, set the joint sensor on J1. Not J2.
Consider J2 as a linkage or a mechanism.
Notes and References
OS Version: n/a