"...And if any man sin, we have an advocate with the Father, Jesus Christ the righteous" 1st John 2:1.
You are in trouble with the Law - God's Law. All humanity is sinful in God's eyes, because we've all broken God's Laws. Romans 3:19 states: "Now we know that what things soever the law saith to them who are under the law: that every mouth may be stopped, and all the world may become guilty before God."
The word "guilty" in Romans 3:19 means "having lost one's case in court." God's Law indicts (formally charges) mankind for having violated God's holy Law. God has declared all mankind "guilty," and has thus declared the death penalty for those found guilty, to suffer eternal punishment in the Lake of Fire (Romans 6:23; Revelation 21:8; 2nd Thessalonians 1:8-9).
Note: All Scriptures are quoted from the precious King James Bible.
Thankfully, Jesus offers to be our Advocate (Defense Attorney)... "And if any man sin, we have an advocate with the Father, Jesus Christ the righteous." The word "advocate" comes from the Greek word parakletos and means "an intercessor."
Hence, Jesus Christ is our defense attorney who intercedes for us in God's divine court. This is only made possible by the blood sacrifice of Jesus Christ (1st Peter 1: 18, 19). Jesus (the Son of God) shed His physical blood for our sins at Calvary, to pay for our sins, thus enabling God the Father (the Prosecutor) to offer mankind a plea agreement.
All that God requires is that we come by way of the Lord Jesus Christ for our salvation (John 14:6). There is no other hope of salvation (Acts 4:10-12). If we do not accept the plea agreement, then we are summoned to stand trial at The Great White Throne of Judgment (Revelation 20:11-15). The lost will be judged according to their works (Revelation 20:13).
If any sinner, no matter how vile or wicked, repents of their sins by owning before God that they are as vile as He has declared them to be in his holy word, and that sinner turns by faith to the Lord Jesus Christ to be forgiven, believing that He is the Christ, the Son of God - then God will save that person. Christ's righteousness is then imputed (charged) to that person's account...
"But to him that worketh not, but believeth on him that justifieth the ungodly, his faith is counted for righteousness. Even as David also describeth the blessedness of the man, unto whom God imputed righteousness without works" (Romans 4:5-6).
This is God's plea agreement for mankind. If we are willing to admit our guilt of sin, and believe on Jesus Christ for forgiveness, then God is willing to justify us on the bass of Christ's blood sacrifice and set us free from the curse of the Law. Amen!