When the scholars say that marriage is obligatory when one fears that he will fall into haraam, does this include masturbation? And also, does this mean that a man must accept the first woman he meets whom is willing to marry him, even if he doesn't like her that much?
All perfect praise be to Allah, The Lord of the Worlds. I testify that none is worthy of worship except Allah and that Muhammad, is His slave and messenger.
One of the most effective means to quit masturbation is to get married. If the person practicing this bad habit believes that he would most likely quit it if he gets married, then it is obligatory on him to marry whenever he can afford it, even if he does not fear committing the sin of fornication as a result. This is because it is obligatory to stop masturbation, and marriage is the most effective means to achieve this. Accordingly, marriage becomes obligatory, since the means take the same ruling as their aims.
Ibn ‘Aabideen wrote, “The same applies to whoever cannot restrain his gaze and refrain from looking at what is forbidden or quit masturbation; it is obligatory on such a person to seek marriage even if he does not fear for himself to fall into fornication.” [Haashiyat Ibn ‘Aabideen]
As for your second question, it is not obligatory on a man to accept the marriage of the first woman who accepts his proposal, if he does not like her. It is allowable for him to refuse marrying a woman whom he does not like or does not feel emotionally attracted to, and he may look for another woman who is suitable for him. However, he should not exaggerate in setting unrealistic criteria of selection.
Allah knows best.
You can search for fatwa through many choices