Reading the Rambam's introduction to his Mishne Torah, I am struck by the fact that he has Achiya haShiloni succeed David in the transmission of the Oral Torah, and not David's son Shlomo. I'm curious as to why this is. Is he relying on a particular source that ascribes this role to Achiya in the same generation? Or a particular source that specifically precludes Shlomo fulfilling it? David is the only king who both rules the nation and features in this chain of transmission, so if there is a source that suggests that Shlomo did not feature in it because he was the king, it would also need to reckon with the fact that David did.
Note: an early version of this question asked why Achiya haShiloni and not Shlomo haMelekh was president of the Sanhedrin. Based on how the rabbonim understood Moshe, and based on their understanding of everybody from Ezra to Rabbi, I assumed that this went for everyone between Moshe and Ezra as well. I now realise that it may not have, and don’t want that to overshadow my question.