I’m guessing that Black is Ground, in which case a continuity test with a multimeter should identify the jumper block’s gound pins. But I guess you have already done that.
As for the signal pin, I would think that it should be perfectly safe to experiment since the iMac’s temperature sensor would be configured as an input rather than an output. This means that if you got it wrong, all that would happen would be that you would be connecting the iMac sensor’s input to the drive’s own inputs.
Is your drive an Apple OEM model with customised firmware? If not, then it won’t have a temperature sensor pin at the jumper block. WD’s retail drives use the jumper pins for other purposes.