This instruction forbade an illegitimate child or, as some Bible scholars believe, a racially mixed Israelite from holding a public office in the nation of Israel. We should remember that Old Testament Israel was an unconverted, carnal people whose interests were primarily material and secular. God gave this statute to keep the physical nation pure and strong.
Today, however, God is building a spiritual house rather than a physical nation. Each individual may or may not become a part of this spiritual building depending on how he conducts his life. A child is not prevented from receiving eternal life because of his parents' sins, nor are the parents to be cut off from God as a result of their children's sins (Ezekiel 18). Our relationship with God depends wholly upon our own actions (see also Jeremiah 31:29-30). Bible writers frequently mention that each person will be judged according to his own deeds (Job 34:11; Psalm 62:12; Proverbs 24:12; Romans 2:6; I Peter 1:17; Revelation 20:13; etc.).
Jesus Christ said that true Christians are to worship God in spirit (John 4:23-24). Therefore, one's physical ancestry will not prevent one from becoming a child of God today. The descendants of certain nations and peoples were never to enter the congregation of ancient Israel, but today we are told that all men of all nations may enter God's Family upon real repentance and acceptance of Jesus Christ as their personal Savior (Acts 10:34-35). Please also read Acts 17:30, Galatians 3:28-29, and II Peter 3:9.