In the first chapter of James :
"13 When tempted, no one should say, “God is tempting me.” For God cannot be tempted by evil, nor does he tempt anyone; 14 but each person is tempted when they are dragged away by their own evil desire and enticed. 15 Then, after desire has conceived, it gives birth to sin; and sin, when it is full-grown, gives birth to death."
This is about being tempted by evil or to do wrong. God will not tempt someone to the end result of death. As the scripture says unless you repent, you will all likewise perish.
God is not tempted by evil. No one should be either.
It lines up when it comes to Genesis 22.
In verse 2 "And he said, Take now thy son, thine only son Isaac, whom thou lovest, and get thee into the land of Moriah; and offer him there for a burnt offering upon one of the mountains which I will tell thee of. "
So this was a command from God first off.
Let's drop down to verse 10.
"10 And Abraham stretched forth his hand, and took the knife to slay his son.
11 And the angel of the Lord called unto him out of heaven, and said, Abraham, Abraham: and he said, Here am I.
12 And he said, Lay not thine hand upon the lad, neither do thou any thing unto him: for now I know that thou fearest God, seeing thou hast not withheld thy son, thine only son from me.
13 And Abraham lifted up his eyes, and looked, and behold behind him a ram caught in a thicket by his horns: and Abraham went and took the ram, and offered him up for a burnt offering in the stead of his son.
14 And Abraham called the name of that place Jehovahjireh: as it is said to this day, In the mount of the Lord it shall be seen.
15 And the angel of the Lord called unto Abraham out of heaven the second time,
16 And said, By myself have I sworn, saith the Lord, for because thou hast done this thing, and hast not withheld thy son, thine only son:
17 That in blessing I will bless thee, and in multiplying I will multiply thy seed as the stars of the heaven, and as the sand which is upon the sea shore; and thy seed shall possess the gate of his enemies;
18 And in thy seed shall all the nations of the earth be blessed; because thou hast obeyed my voice."
So after all this , I hope you're following along good and we see he followed the command of God. But it never amounted to evil and or death for that matter.
But many blessings.
I didnt accept this while thinking: "There is a contradiction".
I accepted this to get a different view on what I think are parts of the Bible some people have found confusing.