Keep reading as Paul in Galatians 5 gives a clear distinction between the fruit of the Spirit and the works of the flesh, and in this distinction he shows the fruit of the Spirit is this:
Fruit of the Spirit (these get eternal life)
But the fruit of the Spirit is love, joy, peace, longsuffering, gentleness, goodness, faith,
Meekness, temperance: against such there is no law. (Galatians 5:22-23)
Works of the flesh (these do not get eternal life)
Now the works of the flesh are manifest, which are these; Adultery, fornication, uncleanness, lasciviousness,
Idolatry, witchcraft, hatred, variance, emulations, wrath, strife, seditions, heresies,
Envyings, murders, drunkenness, revellings, and such like: of the which I tell you before, as I have also told you in time past, that they which do such things shall not inherit the kingdom of God.
Notice here in the works of the flesh that people who do these things will not inherit the kingdom of God, which is eternal life, the words in red those are part of the 10 Commandments being transgressed !!!