I was in a relationship for three years, and we had done a lot of physical things that almost lead to sexual penetration but was always stopped before it got that far. I thought that I was going to marry him, but then realized that he wasn't the person that I wanted to be with and wasn't a true Christian. Did I break an act of marriage because I had thought for a while that I was going to marry him and then changed my mind? Is it okay for me to marry another man at some point?
Sexual sins do not define or create a marriage. A marriage is created by a covenant between a man and a woman. "Yet she is your companion and your wife by covenant" (Malachi 2:14). Sexual behavior are sins in part because they are being done when no formal covenant of marriage is involved. Your intentions does not change whether something is sinful or not.
Take a look at What is or is not allowed between people when they are dating? What is bothersome is that you did not see your behavior as wrong, so long as you were convinced that you intended to marry this guy.
Prior sexual sins do not prevent you from getting married. It may, however, cause difficulties. When a person is willing to violate God's laws in the past, it is appropriate to ask what has changed and whether such violations might occur in the future. There ought to be some indication that a person who once sinned sexually has radically changed -- truly repented and not merely sorry that things did not work out as they wanted.