Jesus was tempted by Satan in the Wilderness, so was it possible that Jesus could have sinned?
When the Apostle John wrote 1 John 3, he actually referred back to the Garden, and the fall of mankind. We read in Genesis 3 that Eve “saw that the tree was good for food, and that it was a delight to the eyes, and that the tree was desirable to make one wise, she took from its fruit and ate; and she gave also to her husband with her, and he ate” (Gen 3:6), and John also mentions these three things when writing that “all that is in the world, the lust of the flesh and the lust of the eyes and the boastful pride of life, is not from the Father, but is from the world (1 John 2:16). And these three…the lust of the flesh, the lust of the eyes, and the pride of life originated from Satan who deceived Eve into taking from the tree of the knowledge of good and evil. John mentions “the lust of the flesh” which causes us to sin, just as it did to Eve when she “saw that the tree was good for food.” Then John mentions the “lust of the eyes” as Eve saw that “it was a delight to the eyes,” and finally John mentions the “boastful pride of life,” and guess what? Eve took from the tree because it was “desirable to make one wise,” so it was a pride-centered sin. John perfectly described the fall, but he also perfectly describes our nature, and also these three…the lust of the flesh, the lust of the eyes, and the pride of life. These three things are just what Satan used to try and get Jesus to sin. Of course, Satan failed.
Immediately after Jesus’ baptism, He is led away by the Spirit of God into the wilderness (Matt 4:1), which is a hostile place to be sure, because there was no water or food there, so “after fasting forty days and forty nights, he was hungry” (Matt 4:2). If that were me, I’d have put it, “And he was starving to death!” The word Matthew uses for “led,” as Jesus was led by the Spirit, is the Greek word, “anago,” which means, “to lead to a higher place,” so it’s almost as if Jesus was compelled to go up into the wilderness by the Spirit, and not so much led there. Where this wilderness was, we don’t exactly know, but perhaps it wasn’t far from Judea where the nation Israel may have wandered for 40 years in the wilderness, and when tested, failed, but where Israel failed in the wilderness, Jesus does not. Jesus is God, even though He is also Man, so His humanity must have hungered greatly, so what does the Enemy do? “[T]he tempter came and said to him, “If you are the Son of God, command these stones to become loaves of bread” (Matt 4:3). Not only does Satan want Jesus to break His fast due to being tempted by Satan, Satan puts out a little barb out there, saying, “If you are the Son of God,” putting it like Satan isn’t convinced Jesus really is the Son of God or perhaps (and more likely) Satan knew that Jesus was God but was also human, and so Satan wanted to insult Jesus by saying, “if” and not “since” you are the Son of God. Whatever the case may be, it’s somewhat of an insult to Jesus, so Jesus rebukes Satan by saying, “Man shall not live by bread alone, but by every word that comes from the mouth of God” (Matt 4:4). Jesus does what we all should do…rebuke Satan by using the Word of God. Jesus’ authority was Scripture, and Satan couldn’t refute it because he knows the Word of God is always true. The Devil was helpless against the sure and certain Word of God, but he’s allergic to the truth anyway. The Word exposed Satan as a liar, so it’s no wonder Jesus called him “the father of lies” (John 8:44). He lied in the beginning (Gen 3) and he’s still lying today.
Man shall live by every word that comes from the mouth of God.
Jesus was born into human flesh to save humans from their flesh. In other words, Jesus had to come to this earth to be born of a virgin, live a sinless life of perfection, and offer His own life as a ransom for the many who would trust in Him (Mark 10:45). The Apostle Peter says that “you were not redeemed with perishable things like silver or gold from your futile way of life inherited from your forefathers, but with precious blood, as of a lamb unblemished and spotless, the blood of Christ” (1 Pet 1:18-19). Jesus came to restore humanity, originally created in the image of God (Gen 1:27), allowing those who come to repentance and faith to become the children of God. If Jesus had sinned, all would have been lost, but since we know that Jesus was victorious over sin and the Devil, He did not sin because He could not sin! It would have been as contrary to His nature as a mother starving her own child to death. It is not possible (in most cases) that a mother would neglect her own child to the point of death, so how much more can we emphasize that Jesus could not have sinned. Even though the Enemy offered Jesus the kingdoms of the world (Matt 4:7-9), Jesus rebuke Satan with the Word of God (Matt 4:1), so Jesus rejected Satan’s offer to have the whole world be under His rule, thus avoiding the pain, suffering, and humiliation of the cross, but Jesus came for this very purpose. By the way, Satan tried to tempt Jesus with the same three things he threw at Eve; the lust of the flesh (“command these stones to become loaves of bread”), the lust of the eyes (“He will command his angels concerning you”), and the pride of life (“All these I will give you, if you will fall down and worship me”).
No, it was not possible for Jesus to sin since He is God, and sin is contrary to His holy nature. It was no more possible for Jesus to sin than for Him to die as God because God cannot die, neither can He lie, although the Bible says that all men are liars (Num 23:19; Psalm 116:11; Rom 3:4). Jesus’ body died, but Jesus as God never did. Near the end of His physical body’s death, Jesus said, “today you will be with me in paradise” (Luke 23:43), so Jesus is God, and God cannot sin, therefore, Jesus could not have sinned, and even though the Devil tempted Him more than any man has ever been tempted, He resisted these three temptations and never sinned. He resisted the Devil by quoting the Word of God. That’s something we should do when we’re tempted by the lust of the eyes, the lust of the flesh, and the pride of life. It may not be Satan or a demon that’s tempting us because “each person is tempted when he is lured and enticed by his own desire” (Jams 1:14), so we can’t sin and say, “The Devil made me do it.” James writes, “Submit yourselves therefore to God. Resist the devil, and he will flee from you” (James 4:7), but you and I are still responsible for our sin. The lust of the eyes, the lust of the flesh, and the pride of life is one unholy trinity, and we cannot defeat these without the Spirit of God. We will all still sin (1 John 1:8, 10), but when we do, we can confess it and be cleansed (1 John 1:9). This is only possible because it was “For our sake he made him to be sin who knew no sin, so that in him we might become the righteousness of God” (2 Cor 5:21).
Here is some related reading for you: Why Are We Born Sinners? A Bible Study 
Resource – Scripture quotations are from The Holy Bible, English Standard Version® (ESV®), Crossway Bibles. (2007). ESV: Study Bible : English standard version. Wheaton, Ill: Crossway Bibles. Used by permission. All rights reserved.