* Samuel was not put in the Temple. He was a prophet and judge of Israel who lived long before the Temple was built. The Temple was built by King Solomon, many years after Samuel's death.
* There is no mention of Samuel's age when the Temple was built. The Bible focuses on his role as a prophet and judge, not on his age during the building of the Temple.
Perhaps you are thinking of a different story or figure?