Yes, the previous respondents are correct regarding the fact that we are in a new covenant. Please refer to the book of Romans concerning the Law and how it applies to us. Also the Council at Jerusalem addresses this fact in the book of Acts if you’re looking for more detailed Biblical understanding.
But, leaving that aside, you’re understanding is completely incorrect regarding two major issues:
First. Deut 23:2 refers to “… those born of an illicit union …”
In this case “illicit” does not mean unmarried; it is understood to mean incest. (Mishnah Yebamot 4.13)
Next, please note that the next verse is:
“No Ammonite or Moabite shall be admitted to the assembly of the Lord. Even to the 10th generation, none of their descendants shall be admitted …”
Now we know that Ruth was a Moabite so, counting 10 generations from that we have:
- Ruth’s son Obed who was the father of
- Jesse who was the father of
- David (oops, what was King David thinking when he went to church?)
- who was the father of Solomon who was the father of
- Rehoboam who was the father of
- Abijah who was the father of
- Asaph who was the father of
- Jehoshaphat who was the father of
- Joram who was the father of
- Uzziah …
None of these people would have been allowed in “church” if this were a big deal even back then.
Which brings me to the *second *misunderstanding.
Actually the “Lord’s assembly” was much more than just “church”. It was a cohort of adult male Israelite, i.e., the covenant community functioning as a restricted religious, military, and political association.
How on Earth was this brought to your attention? What translation of the Bible are you using? Just curious.