You can focus on positive and healthy forms of literature and media. Read books and watch movies that uphold proper values. Also, engage in discussions about healthy relationships and family values, so that you have a clear understanding of what is acceptable and unacceptable, which will help you resist the influence of such improper fanfiction concepts.
Firstly, be aware of your own values and the importance of family ethics. Remind yourself constantly that family relationships should be pure and based on non - sexual feelings. Secondly, limit your exposure to such fanfiction. If you accidentally come across it, immediately disengage and turn to more positive and ethical reading materials. You can also surround yourself with people who have similar values, and through their influence, strengthen your ability to resist the allure of inappropriate fanfiction concepts.