In order to this question, one must first ask what it means for a particular individual to be tempted to do X. Given ordinary usage, it seems that one is tempted to do X when they are confronted with significant desires to do X. If this is correct, then it seems that Jesus could be tempted simply in virtue of having had a desire to do something which, if he had done it, would have been a sin. So long as the temptation to sin is not itself a sin (and it isn’t, otherwise it would be impossible to resist temptation), Jesus could have had the desire to perform an action that he knew he could not (and therefore would not) perform.
It may be asked how the life of Jesus could be genuinely meritorious if he did not have the capacity to sin. In order to answer this question, one need only suppose that Jesus lived his earthly life without reliance on his divine nature to keep him free from sin. Thus he abstained through the strength of his will, even though had he been about to sin, the Father would have kept him from so doing (perhaps in the way that he is said to have kept Abimelech from sinning—see Genesis 20:6).
You may also be interested in Did God Make a Mistake in Creating Us?