The ancient Sumerians wrote about Venus, and realized that it was different than the stars, and the Greeks wrote about the planets as early as the 6th century BC. This is when they were first written about, not discovered, as we have no way of knowing when they were discovered unless they were written about.
Now, they were called "wandering stars" and other names (the word "planet" simply means "wanderer"; the ancients did not understand what they were, but they knew they were different. The ancient Greeks had things figured out enough to predict eclipses, etc., and they knew the Earth was round, and some of them had the size of the Earth reasonbly well figured out. (Some of them were way off, as well.) However, most of them were Earth-centric.
Because these stars stayed withing 8 degrees of the ecliptic, they were the important parts of the zodiac. (In fact, the zodiac is defined by the space within 8 degrees of the ecliptic because that's where the motions of the planets stay.) So, saying that they didn't know that these were other worlds like ours that were orbiting the Sun, is technically true. But, they were aware that they orbited the Sun, and they knew they weren't stars, and in that sense, they did know. But, no matter what, they have been distinguished from stars since several centuries BC, that we know of.
Eratosthenes had a reasonably good measurement of the Earth by the 3rd century BC, Aristarchus had the distance to the Moon figured out about the same time, but because they couldn't figure out an important angle, they couldn't figure the distance to the Sun, but they knew that it was much further away than the Moon. Now, only five of the planets besides Earth can be easily seen with the naked eye, and they were all known by the ancients. They are Mercury, Venus, Mars, Jupiter and Saturn.
But, to say they didn't know about the planets flies in the face of what we know, based on secular writings, if nothing else.
Since 2 Kings 23 was written in the 6th century BC, I suppose it's possible that they were ignorant of things that others in the world new, but I would find that odd, since so much of Paganistic worship was based upon the planets.
On the other end of the scale, the ancient Greeks had some understanding of the elements and atoms.