“Then David consoled his wife, Bathsheba. He went in to her and lay with her. Then she bore him a son. He named him Solomon. Yahweh loved him. He sent a message by the prophet Nathan. So he named him Jedidiah, because of Yahweh.”
There is no miraculous birth for Solomon, like that of Samson or some other prophets. Solomon is to make up for the lost infant in the old fashioned way of sexual intercourse. This time Yahweh is pleased with child Solomon. This is the only time that Solomon is called Jedidiah, which means beloved of Yahweh, in all the biblical literature. I am not sure why Solomon stuck as a name, but it surely did, since it appears over 270 times in the biblical literature. Some books of the Bible have a proposed Solomon authorship.