According to the immediate context, as the above response made it lucid, Paul is making emphasis on the steadfastness of God's promises. However, there are clear allusions related to the expression that "it is impossible for God to lie" (ἀδύνατον ψεύσασθαι θεόν), for this expression relates to a radical and absolute distinction between God and humans, for only God is in absolute sense devoid of lies, whereas "every man is liar" (Psalm 116:11; or Romans 3:4 "Let God be true, and every man a liar"). It is not that man always says lies, which is false of course, but those statements mean that man can be truthful only through participation in the Truth, who/which is God; that is to say, man cannot be Truth-proper, that is property only of God.
Thus, Jesus saying "I am the Truth" (John 14:6) unequivocally claims His co-divinity with Father, which in the eyes of Jews not believing in His divinity made Him a blasphemer perfectly worthy to be killed (John 10:33).
So, there is an ontological difference between God and man, and as Descartes says, lie is a deficiency and weakness, and since God who is perfect (Matt 5:48) cannot possess any deficiency, therefore He is totally devoid of lie also, and since He cannot be deficient, the lie being necessarily an outcome of deficiency, neither can He lie.
So, you are right in overall estimation of God: He not only will not lie, but it is impossible for Him to lie, that is to say, ontologically impossible, as it is impossible for water not to be wet, or for a quadrangle to be round, and even more so, for no physical, created image adequately applies to the transcendency of God.
Also elsewhere Paul speaks of difference between Jesus and humans: "when we fall, He remains steadfast, for He cannot (οὐ δύναται) deny Himself" (2 Tim. 2:13), exactly the same ontological impossibility asserted of Jesus as is asserted of God in Hebrews 6:18.