Hello, yes you would’ve sinned if you slept with him because this is outside of the covenant of marriage. Ask the Lord for forgiveness and ask the Holy Spirit to give you strength to not let this happen again. You can’t keep doing this out of fear that you will lose this person. IF this is who God has for you then he will still be there. Honor God first.
We will be praying for you that if this is indeed the person God has for you he will marry you.