You can't force her to be friends but you can expect her to behave politely.
How often do you go over to the cousin's? If it's just a couple of hours once a week - she needs to get over it, unless there is a serious reason for her not to. For example, if she is being bullied.
but if it's just that she's bored... whatever happened to children being able to entertain themselves? When I was a kid my parents weren't helicopter parents. I liked to go off on my own sometimes and ignore the grown ups while I read a book or colored or climbed a tree or played with legos.
I actually think it's an important life skill to be able to entertain yourself instead of always needing guidance and interaction. Older friends of mine who grew up in the 1950s and '60s have told me that they'd go off on their bikes for hours without any parental supervision. Of course, it was a much safer time, but the point is - children do not need to have an adult constantly monitor everything they do and say.
Tell your daughter that once a week you want to spend time with your cousin. She is expected to be polite, but she does not have to play with children she does not like. Instead, she is welcome to select a few books, games, art projects - whatever she would like to do for a couple of hours while you visit with your cousin.