The KJV was compiled in the 17th century (the first edition of
the KJV was published in 1611 during the reign of Kings James I of
England/James VI of Scotland). Since then the scholarship of Greek
and Hebrew, as well as the discovery of older and better
manuscripts have improved bible scholars' understanding of the
original languages.
Those translations which give the number 40,000 are based on the
Masoretic Text, the Old Testament used by Jews in the Middle Ages.
But if one checks the Septuagint (LXX), one discovers manuscripts
giving the number 4,000--the same as in 2 Chronicles 9:25. (The LXX
was so called because 70 Jewish scholars were commissioned to
translate the OT texts from Hebrew to Greek in 300-200BC)
Here is something I read off the web on this matter:
"What we have here is a classic example of a copyist error. Before
the printing press, each copy of the Bible had to be produced by
hand from a previous copy. Though the scribes doing the copying
were amazingly meticulous in their efforts, occasionally a scribe
would get sleepy or lose his concentration or mishear a word in the
text as it was being read aloud, and he would make a mistake. These
tiny mistakes are called copyist errors, and they were dangerous
because, if not caught, they would be passed on to future copies
made from this scribe's work.
The Hebrew word for forty is only two strokes of a pen different
from the word for four. What probably happened in the case of 1
Kings 4:26 is that some early scribe became sleepy and accidentally
added those two strokes to the word he was writing. No one caught
the error. His manuscript became the basis for the Masoretic Text.
The true form of the text was preserved in the LXX manuscript
tradition (the LXX being an early Greek translation of the Old
Testament), which is used for this verse by almost all modern
Bibles.
The fact we have a copyist error in this case has been known for a
long time. For example, Keil & Delitzsch's Commentary on the
Old Testament, first published in the mid-1800s, states: "Arba'iym
(40) is an old copyist's error for arba'ah (4), which we find in
the parallel passage, 2 Chronicles 9:25, and as we may also infer
from chapter 10:26 and 2 Chronicles 1:14, since according to these
passages Solomon had 1,400 rekeb or war chariots. For 4,000 horses
are a very suitable number for 1,400 chariots, though not 40,000,
since two draught horses were required for every war chariot, and
one horse may have been kept as a reserve" (Commentary on the Old
Testament 3:53).
Generally, numerical discrepancies are trivial in their solution
and are obvious to scholars. John Haley's classic work, Alleged
Discrepancies of the Bible, states, "We have previously, more than
once, called attention to the marked resemblance of Hebrew letters
to one another; also to the fact . . . that these letters were in
ancient time employed to represent numbers. These two facts
indicate at once the cause and the solution of the numerical
discrepancies" (Alleged Discrepancies, 380)."