I have been doing a horrible sin for multiple years (masturbation). I do so frequently. I am studing in Uni and I have been trying to get married for two years so I can stop sinning, but have found no spouse. I have made numerous attempts to stop sinning by seeing a psychologist, fasting for 40 days, increasing istighfar, and more. I don't know what else to do and I think my heart is diseased. I need a solution. I am in great distress.

You must do whatever it takes to stop sinning. One option is temporary marriage. Other is to widen your search for permanent wife. You must not let the Shaitan win and should work hard to satisfy your needs in an Islamic acceptable way.
You need to make yourself busy and don’t go through boredom. Don’t watch or think of indecent things and try to busy yourself with halal means and recommended deeds