Your fern probably has aphid that produce the sweet sticky substance that attracts the ants. I use AzaMax spray. It's non-toxic and safe for kids and cats. Be sure to spray the bottom of the leaves. Give the plant a shower to clean off the gunk. Best And Happy Yardening, Nancy.