Jesus was fully human and as such he experienced such human weaknesses as hunger, thirst, pain and death. If he did not, any discussion of trials and temptations for him would be pointless. The text, however, does not support that Jesus was tempted by his own desires as described in James 1:14-15.
Temptation can have both an internal as well as an external component. Consider the first temptation related in Genesis (Gen 3:1-7). The serpent laid the trap, but it was Eve’s own desire that made her take the bait.
When the woman 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 some of its fruit and ate; and she also gave some to her husband with her, and he ate. – Genesis 3:6
Jesus was susceptible to every kind of external temptation, as when he was tempted in Matthew 4:1-10. However, such efforts to tempt him were met with immediate and unequivocal rejection. There is no evidence in the text that they aroused any internal response or awakened any latent desire. In other words, there is no indication that Jesus was tempted as described in James 1:14-15.
However, this does not mean that Jesus did not experience temptation in any other way. Jesus received this command from the Father - to lay down his life so that he may take it up again.
For this reason the Father loves Me, because I lay down My life so that I may take it back. No one has taken it away from Me, but I lay it down on My own. I have authority to lay it down, and I have authority to take it back. This commandment I received from My Father. – John 10:17-18
The command to lay down his life was to be obeyed of Jesus’ own volition and authority. There were times, I think, when he struggled against the temptation to lay down the task that was appointed to him.
Now My soul has become troubled; and what am I to say? ‘Father, save Me from this hour’? But for this purpose I came to this hour. – John 12:27
Though the command given to Jesus was unique to him, the way he was tempted is not different from how we are all tempted, which is the temptation to choose other than that which God has willed for us. Jesus’ obedience thus lies not only in the laying down of his life but also in the submission of his will. For this also he was loved, that he chose to place God’sthe Father's will above his own.
“My Father, if it is possible, let this cup pass from Me; yet not as I will, but as You will.” – Matthew 26:39