Would it be wrong to place a condition that the person one wants to marry must be free of their addiction to pornography and masturbation for a certain amount of time before they get married? Or would it be makruh to place a condition when a marriage could potentially help? However the fear is that these addictions will continue into the marriage
Yes you can place those conditions. If someone has an addiction problem they need to address them before going in the marriage. However, marriage would also be a way to confront those issues.