God, not ‘the Father’
First of all, ho theos means ‘God’. If James had meant ‘the Father’, he would have written tou Patros as in John 1:18. But the term τοῦ Πατρὸς only ever describes a relationship, incidentally, not a distinct being.
Secondly, the definite article (the) is regularly applied to proper names in Greek, including God. It does not mean that the subsequent translation into English requires ‘the’, and there continues to be debate on the ruling of article use among scholars. One source with one example would not be enough to argue that use of an article suggests James meant ‘the Father’ instead of God in this case, especially considering you’re talking about two different authors.
But does that mean James meant ‘Jesus’?
Again, if he had meant Jesus, he would have written Jesus. Because Jesus, although ‘one’ with God, is not interchangeable with God. ‘Jesus’ refers to a particular manifestation of God that is also undeniably human.
But before I explain why Jesus can be ‘tempted’ but God cannot, I suggest we clarify meaning of the Greek word πειράζω (peirazo), which is central to both James 1 and Matthew 4, and translated as to tempt, but more accurately to test or try.
Test or try, not ‘tempt’
The modern English verb to ‘tempt’ suggests an ability to sway someone particularly towards evil, but the Greek word πειράζω (peirazo) is used in both a positive and negative sense to mean try, attempt or test:
And when he had come to Jerusalem he attempted (ἐπείραζεν, epeirazon) to join the disciples; and they were all afraid of him, for they did not believe that he was a disciple. (Acts 9:26)
Likewise, the Hebrew word נָסָה (nassah), to which Jesus refers in his response in Matthew 4:7 (quoting Deuteronomy 6:16), also does not mean to tempt towards sin or evil, but instead to test or put to proof.
”You shall not put the Lord your God to the test, as you tested him at Massah.” (Deuteronomy 6:16)
Both the word for ‘trial’ and the verb translated as ‘tempted’ in five instances in James 1:13-14 all come from this same Greek word πειράζω (peirazo). In context, James argues that any trials we must endure come not from God but from our own desire:
Blessed is the man who endures trial, for when he has stood the test he will receive the crown of life which God has promised to those who love him. Let no one say when he is tempted, “I am tempted by God”; for God cannot be tempted with evil and he himself tempts no one; but each person is tempted when he is lured and enticed by his own desire. (James 1: 13-14)
If we look at the word ‘tempted’ not as the modern English word, but as the ancient Greek word that means tested, tried or put to proof, then James’ argument seems to be that God actually cannot be put to the test by ‘evils’ (the plural adjective κακῶν translated here as ‘evil’, is more accurately ‘evils’, as in harm or adversity) - neither does He actively test us with these adversities. Despite what Moses suggests in the OT, James argues here that God plays no part in these trials. We are tested instead as humans by our own material desires - and so was Jesus.
Jesus is human
Jesus was still human, you see. As a physical body he naturally felt hunger and the lack of power and pride in having no home, no wife or offspring, no financial security, no occupation, etc. His ability to pass these ‘trials’ in the wilderness came not from any genetic kinship with God, but from a spiritual or conceptual father-son relationship - one available to all of us. Because ‘the devil’ here is just a literary device to illustrate a conflict between the physical relationship with these desires, that defines Jesus as human, and the spiritual relationship with God, that defines Jesus as ‘one’ with God.
So when Matthew states that Jesus was ‘tested by the devil’, he refers to the material desires that put him to the test in the wilderness (desire for food, as well as earthly kingdoms and glory) but had no effect on the spirit of God within him, and therefore on his actions. And when ‘the devil’ suggested that Jesus throw himself from the pinnacle of the temple to prove that God would protect him from harm, Jesus quoted Deuteronomy 6:16 against his natural, physical desire for protection from all harm - as well as the suggestion that Jesus should put God to the test.
To be tested is to be human
James does not instruct his readers to avoid being tested - humans will always be lured or enticed by our material desires, and so put to the test - but it is by giving in to them, by choosing to satisfy these desires of the flesh (like hunger, power and pride) as a priority that one creates ‘sin’, rather than enduring trial and withstanding adversity by focusing on a spiritual relationship with God and others, as Jesus did.
(Incidentally, I think the real question is whether Moses was correct in stating that God was put to the test at Massah - was God really compelled to prove himself if God cannot be put to the test?)