Would it be possible for you to attend a visitation perhaps, if there is one prior to the funeral service? Or, is there anyone near you that is going that you could get a ride with? Another option would be to rent a car just for the day to get to the funeral.
Consider those, and if none are possible then sending an appropriate sympathy gift is fine. You may also want to call one of your cousins just to at least by voice, convey your condolences and explain your absence. That should head off any potential perceptions of disrespect if you anticipate this is how they would react. Every family is different, though, and it’s hard to assess if they would be upset with you so go with your instincts here.