Answer: Jesus did indeed preach to spirits in prison but not during the period between his death and resurrection. The scriptures concerning your question are toward the end of 1Peter, chapter 3.
By which He also went and preached to the spirits in prison, which disobeyed in a past time, when once the long-suffering of God was waiting in the days of Noah, while the ark was being prepared . . . (1Peter 3:18 - 20, HBFV throughout).
Christ's last words on the cross were "Father, into your hands I commit My spirit" (Luke 23:46). He was then dead and completely unconscious for the three full days or 72 hours. God gave him back his spiritual essence when he resurrected him from the dead. This means it was impossible for Christ to communicate with anyone, let alone any spirits, for the entire time between his death and resurrection.
Let us now tackle a couple of basic questions generated by 1Peter 3:19 before answering your inquiry. Who were these disobedient spirits (verse 20) and why were they in a prison? These beings were not conscious "immortal souls" of evil humans who had died, since at death ALL humans become unconscious and remain so until the resurrection. We find our answers in the books of 2Peter and Jude.
For if God did not spare the angels who sinned, but, having cast them into Tartarus (Strong's Concordance #G5020, meaning a place of restraint), delivered them into chains of darkness to be kept for the judgment . . . (2Peter 2:4).
And the angels who did not keep their own original domain, but deserted their habitation, He is holding in eternal bonds under darkness unto the judgment of the great day (Jude 6).
When Satan rebelled against God (Isaiah 14:12 - 15, Ezekiel 28:12 - 18) he convinced a third of all the angels to become evil spirits and follow him (Revelation 12:4). After Lucifer's rebellion was totally crushed, God decide to place a certain number of disobedient angels into some kind of spiritual prison (we do not know how many) to await judgment.
The devil, the chief of the demon spirits, will be thrown into such a prison at Christ’s return (Revelation 20:1 - 3). He will spend about 1,000 years in it then be released (for a short time) at the end of the Millennium (verse 7).
When did Jesus (who was the GOD of the Old Testament) preach to these evil spirits in prison (a place of restraint)? 1Peter 3:20 states it was in the days of Noah, when the ark was being built. He personally witnessed to them at a time when humans, who had existed on the planet for more than 1,500 years, had reached a point where they thought about doing evil continually (see Genesis 6).