There were a few novels that fit this description, such as Legend of the Earth Emperor, Mountain God in the City, Incense Becomes God, I Actually Became a Mountain God, and so on. You can choose one according to the plot introduction of these novels and your own taste. I wish you a happy reading!
Jiang Ziya was a historical figure as well as a mythical figure. In ancient Chinese mythology, Jiang Ziya was a famous politician, military strategist, and counselor, and was honored as "Jiang Taigong". Legend has it that he was originally a feudal lord at the end of the Shang Dynasty. Later, due to some reasons, he abdicated and became a civilian. When he met an immortal while fishing, he received the guidance and help of the immortal and became an outstanding politician and strategist. In ancient Chinese novels, the image of Jiang Ziya was often depicted as a god or hero with superior wisdom, superb strategy, and martial arts. He was used as a symbol to inspire people's wisdom.
Jiraiya might comfort Naruto by sharing his own experiences. He could tell Naruto about the times he faced difficulties and how he overcame them. For example, he might talk about his training with the toads and how he grew stronger through perseverance.
One possible reason could be that Naruto feels he has learned all he can from Jiraiya at that point. Maybe he wants to explore his own path independently and test his skills without Jiraiya's constant guidance.
Jiraiya's reaction might be complex. He might be in awe of Naruto's new power but also sad about his departure. He could see it as a natural progression in Naruto's journey, yet still feel a pang of loneliness. He might start to reflect on his own life and training methods, wondering if he could have done something differently to keep Naruto with him. At the same time, he would be eager to see what Naruto will achieve in the world with his newfound abilities.
They often make him seem irresponsible. For example, in normal Naruto story, Jiraiya is seen as a mentor to Naruto. But in bashing fanfiction, he may be shown as being more interested in his own adventures and leaving Naruto alone at crucial times.
It could be Orochimaru. Since Orochimaru has a long - standing feud with Jiraiya and is always up to no good. If Naruto ditches Jiraiya, Orochimaru might see this as an opportunity to manipulate Naruto. He could try to convince Naruto that Jiraiya was holding him back and that he can offer Naruto more power, all while having his own evil plans for Naruto.
Jiraiya is frequently shown as a very dedicated mentor. He is willing to sacrifice his own time and resources to train and guide his students. In some fanfictions, he goes to great lengths to protect his students from harm, even putting his own life on the line. This selfless aspect of his character is often emphasized.
Perhaps in this fanfiction, Jiraiya discovers that Naruto is going to be the cause of a major catastrophe in the future. He might have seen a prophecy or some sort of sign that convinces him Naruto has to die to prevent this. It could also be that Jiraiya has been misled by false information about Naruto, which makes him think that Naruto has become an evil force that needs to be eliminated.
One possible reason could be that Naruto feels he has learned all he can from Jiraiya at that point. Maybe he has reached a level in his training where he believes he needs new experiences and challenges that Jiraiya can no longer provide.