It is difficult for some to understand that some Biblical passages which are framed as promises are not absolute promises at all but rather general truths with exceptions. For example, when in Proverbs it says, “Train a child in the way he should go, and when he is old he will not turn from it” (22:6), this cannot be an absolute promise. In this same book Solomon warns his son in nine chapters not to stray from the path. The obvious implication is that his son can in fact stray, though he was raised better. Proverbs is typically replete with this type of “promise” that is not to be understood as a promise, but as the observed norm for how God deals with us.
I believe James 5:14-16 fits this category. He says,
Is any one of you sick? He should call for the elders of the church to pray over him and anoint him with oil in the name of the Lord. And the prayer offered in faith will make the sick person well; the Lord will raise him up. If he has sinned, he will be forgiven. Therefore confess your sins to each other and pray for each other so that you may be healed. The prayer of a righteous man is powerful and effective.
If there were no exceptions to this “promise” no Christian would ever need to die. Even on his death bed he could call for the elders and the Lord would raise him up. But we are told that humans are destined to die once (Hebrews 9:27). None but Enoch and Elijah have ever escaped that fate. We see exceptions to healing prior to death in Trophimus being left sick at Miletus by Paul (2 Timothy 4:20). We see Paul’s thorn in the flesh left there by God (2 Corinthians 12:7-9).
Believers should avail themselves of the elders of the church when they are sick. We should pray in faith and confess our sins and be healed. But we must not presume upon the will of God for every situation. Even Jesus, though he prayed that he might forego the cross, said, “Yet not what I will, but what you will” (Mark 14:36).
The James passage tells us that God has both the power and willingness to heal us. But His love and wisdom may move Him at times to withhold a display of healing power in preference to a display of His enduring power through the life of His child. His overarching goal is holiness, not health or even happiness. Holiness is a bigger part of our “healing” than physical healing is.