She isn't "over" Dan more than any who lost to death someone they were in a deeply loving relationship. (What she was able to move past was the emotionally brittle person she became after Dan's death. Thanks to Naruto reminding her of both Nawaki and Dan). That doesn't mean she didn't love Jiraiya, she was in love with both men. Kishimoto made that clear- it was just Jiiraiya's words and behavior that kept her from realizing he was not just lusting after her body but was in love with her, until their last conversation. We see in her private mourning moments that she had feelings for Jiraiya years before she became involved with Dan. I'm glad Kishimoto wrote this realistically, that a woman can romantically love more than one person, even if the first relationship was very mutual and loving, and the loss of that person was devastating. We see that in a more subtle way with Konan, yes, it was Yahiko that was her first love, and there was mutual attraction there, but after Yahiko's death there's a subtle vibe of a kind of romantic love between Konan and Nagato.
This is to get the readers to see that Sakura's one sided crush on Sasuke- that she wants to rid herself of the painful remnants of, and that she feels depressed and ashamed about, has absolutely no connection or barrier to her romantic feelings for Naruto. They are in different places in her heart. Her feelings for Naruto are a source of joy and contentment for her, one she is quite ready for it to become a mutual relationship.
Like the difference between deep love and deep partnership. And the argument can be made that though Jiraiya loved Tsunade deeply, he was a terrible partner. Even older, he was very set in his wandering, philandering ways. Kishimoto really shines in the creation of these complex, poignant storylines. And I would wish for a third timeskip just to see him develop Naru/Saku in that way. (Not so much the bad stuff, but just a more mature relationship than a 16-year-old love.)