Background of the Goal
Genesis 4 records the birth of Cain and Abel and then jumps to their offering to God. Abel's offering is accepted by God while Cain's is rejected.
Cain's response to his offering being rejected by God were feelings of rage. He possessed a rotten, rebellious attitude that manifested in his face and how he interacted with others.
And Cain was extremely angry and his countenance [his facial expression] fell (Genesis 4:5, HBFV throughout).
God, seeing Cain's anger, decides it is time to have his first direct verbal interaction, after the Garden of Eden, with a human.
And the Lord said to Cain, "Why are you so angry? And why has your countenance fallen?" (Genesis 4:6).
God, of course, knows why Cain has made himself angry. The Lord is encouraging the first human born of a woman to tackle the real cause of his bitterness so that he can address it.
We now come to the core of our discussion that will eventually lead us to God's goal for man in one verse!

A Momentous Choice!
"If you do well, shall you not be accepted? But if you do not do well, sin lies [stretches itself out, crouches] at the door. Its desire is for you, but you must rule over it!" (Genesis 4:7).
Verses 6 and 7 reveal that God did not consider Cain's initial anger a sin (see Ephesians 4:26). The Lord then makes it plain that Cain still has the same opportunity to do well and be accepted as Abel.
Verse 7 is the key. God encourages Cain to overcome his human nature and take responsibility for his actions that he alone chose to do. His brother Abel had nothing to do with his offering or its subsequent rejection.
If Cain admits he was wrong and follows it up with an offering pleasing to God then he will be accepted as well. By doing these things he will begin to gain the character to increasingly rule over his human nature that leads him to sin.
Cain can also choose the easy path, the path of least resistance which follows his human nature and its desire to justify his thoughts and behavior. This, according to God, will leave the door wide open for sin to overcome and rule over him!
What Is Human Nature?
One definition of human nature states the following.
"Human nature comprises the fundamental dispositions and characteristics - including ways of thinking, feeling, and acting - that humans are said to have naturally.
"The term is often used to denote the essence of humankind, or what it 'means' to be human." (Wikipedia definition of human nature).
Human nature, however, is more than above. It is the tendency of our thoughts and conclusions to be self-centered, self-justifying and ultimately self-defeating. Human nature is a mixture. It is a mix of what is truly good or bad (e.g. murder, stealing), as well as what each person decides for themselves is right or wrong.
Human nature is the manifestation, in each of us, of the Tree of the Knowledge of Good and Evil (Genesis 2:9). This tree symbolized our determining for ourselves, apart from God, what is right and wrong.
The Goal
Genesis 4:7, in one verse, lays out what God's goal is for each human.
Each of us comes into the world with human nature so that we have something to push against in order to develop character. Our Creator wants us, with his help, to fight against our human nature and trust what he says. God's one goal is for all of us to repent and become overcomers so that we can rule over sin and live forever!