There is no contradiction here at all as the translation of the verb נִסָּה (nissah) in Gen 22:1 means "to test, try", not "tempt to sin". The same verb also occurs in Ex 15:25, 16:4, 17:2, 7, 20:20, Num 14:22, etc. The full lexical meaning is given in the appendix below.
Thus, it remains true that God does not tempt to sin as per James 1:13. However, God does test and try people as per the following:
- Rev 3:19 - Those I love, I rebuke and discipline. Therefore be earnest and repent.
- Heb 12:5 - And you have forgotten the exhortation that addresses you as sons: “My son, do not take lightly the discipline of the Lord, and do not lose heart when He rebukes you.
- James 1:12 - Blessed is the man who perseveres under trial, because when he has stood the test, he will receive the crown of life that God has promised to those who love Him.
Thus, the answer to the OP's question is in the previous verse, James 1:12, as quoted above.
APPENDIX - BDB entry for נ־ס־ה
test, try (synonym בחן), absolute 1 Samuel 17:39 (a sword); with בְּ Judges 7:39; Ecclesiastes 2:1; with accusative Daniel
1:12,14; accusative + בְּ 1 Kings 10:1, 2 Chronicles 9:1; Ecclesiastes
7:23.
attempt, assay, try to do a thing, with Infinitive Deuteronomy 4:34; Deuteronomy 28:56; with accusative Job 4:2 (venture a word).
test, try, prove, tempt [but not in modern sense of the word: see DrDeuteronomy 6:16; Psalms 453, 483]
a. God tests or proves Abraham Genesis 22:1 (E), Israel Exodus 15:25;
Exodus 20:20 (E), Exodus 16:4 (J), Deuteronomy 8:2,16; Deuteronomy
13:4; with בְּ Judges 2:22; Judges 3:1,4; tribe of Levi Deuteronomy
33:8 (poem); Hezekiah 2 Chronicles 32:31; psalmist Psalm 26:2.
b. Israel tests, or tries God: Exodus 17:2,7; Numbers 14:22 (J),
Deuteronomy 6:16; Psalm 78:18; Psalm 78:41; Psalm 78:56; Psalm 95:9;
Psalm 106:14; so Ahaz, Isaiah 7:12.