Was the idea of eternal life always a part of Judaism? If so, why didn’t the Sadducees believe it?
It is the Pharisees who believed in the Resurrection, not the Sadducees. That is something that is peculiar to their sect alone.
The Scripture plainly shows that within Judaism there has always been a belief in Eternal Life. I will point you in the direction of the Psalms because you will find plenty of references. If you start with Psalm 1 and then work your way through there are a heap of references to Yahweh looking after the righteous, but not the wicked who will perish.
If you are Catholic you might want to search for references in Sirach (Ecclesiasticus) as well as the Book of Wisdom. I have a gem from Sirach:
“Grubs and worms will have him as their legacy, and the man who knows no shame shall lose his life.” (Ecclesiasticus 19:3)
This verse reminds me of spiritual death.
The Sadducees accepted as binding only the Torah, the first 5 books of the Bible. They did not accept as binding the myriad of laws found in oral tradition, preserved and interpreted by the Pharisees. Since the resurrection of the body and the idea of eternal life are not specifically enunciated in Torah, they did not endorse it.