One way to write it is to focus on Anakin's positive relationships. For example, if his bond with Obi - Wan was strengthened even more, it could prevent his fall. The fanfic could show more of their training sessions together, with Obi - Wan guiding Anakin through his inner turmoil in a more effective way.
A fanfic where Anakin never turns to the dark side could be written by re - imagining the temptations he faced. Instead of being lured by Palpatine's false promises, Anakin could see through his schemes early on. The fanfic could then focus on Anakin's growth as a Jedi, perhaps he goes on a journey to learn more about the Force from ancient Jedi texts or other wise Jedi. His character development could be centered around his ability to resist the dark side, and how he uses his love for his family and friends and his loyalty to the Jedi Order to stay true to the light.
One possible plot could be that Anakin continues to be a Jedi and plays a crucial role in bringing more peace to the galaxy. He might focus on training new Jedi, using his unique skills and powers for good. For example, he could be sent on diplomatic missions, using his charisma to convince planets to join the Republic without the need for military force.
If Anakin never turned to the dark side in the fanfic, the galaxy would be a very different place. The Clone Wars might have ended sooner, as Anakin's strategic brilliance could have been fully utilized for the good of the Republic. He would still be a symbol of hope for the Jedi and the people of the galaxy. His friendship with Obi - Wan would have remained strong, and they could have achieved great things together as a team of powerful Jedi.
If Anakin didn't turn, it could have meant a more peaceful galaxy. Maybe he would have continued as a powerful Jedi, helping to maintain order and justice without succumbing to the temptations of the dark side.
You might want to check out 'Anakin's Steadfast Light'. Here, Anakin is faced with numerous temptations but always manages to resist, thanks to the support of his friends and his own inner resolve. The plot is full of close calls and challenging situations that test his commitment to the light side, but he never gives in.
If Anakin never turned, Luke and Leia would have grown up with their father. The Skywalker family would be united, and they could all be trained as Jedi. This would make them a powerful force for good in the galaxy. Also, the Sith would likely have a harder time achieving their goals without Anakin as Darth Vader.
If Anakin hadn't turned, the Sith's plans might have been foiled. The balance of power would have remained with the Jedi, and galactic conflicts could have been avoided or resolved differently.
If Anakin never turned to the dark side in comics, the Jedi Order could have remained strong and continued to maintain balance. Maybe he would have become a great Jedi Master and trained many new padawans.
Well, the galaxy would have been a much more peaceful place. The Jedi Order might have remained strong, and there would likely have been no rise of the Empire.
One way could be to show Padme gradually losing faith in the Jedi Order. Maybe she discovers some dark secrets within the Order that make her question their motives. For example, if she finds out that the Jedi have been involved in some unethical political manipulations in the name of peace. This could start to chip away at her idealistic view of the light side and nudge her towards the dark side.
His relationship with Obi - Wan would have been much more positive. There would be no betrayal, and they could have continued to be master and apprentice, or perhaps even equals as they both grew in the Force. With the Jedi Order intact, they could have worked together on many important missions. Anakin would also have a different relationship with Yoda. He would be seen as a more stable and reliable Jedi, and Yoda might have given him more responsibilities within the Order.