Oh, and in my reading of the SotM, Jesus speaks out against adultery, not masturbation (that’s covered in the OT, as I recall).
As far as I know, there is only one reference to masturbation in the OT and it is not clearly anti masturbation.