Your TDC is working perfectly!
The distance is irrelevant for the gyroangle. (Pythagoras

)
as long as the bearing to your target is fix.
Assuming your target is at bearing 40° starbord 1000 meters away (course and speed are constant) you'll set up a fast torpedo to hit it after one minute at given gyroangle.
If your target would be 4000 meters away (same course, speed and bearing) the torpedo would have to run 4 minutes to reach the target - but at the same gyrosettings.
The contact travels four times the distance it would have done in the first example - as the torpedo does. They meet under the same angle - in both situations - and therefore the gyroangle is the same.
Phew - I hope it's comprehensable.