Funerals are for the living - so this is about your husband and his family and honoring their grief. Was your husband and his parents close to the great uncle? Will you be comfortable driving the four hours? How do you feel about your husband going without you?
Personally I would probably have let my husband go without me - but I had huge babies and the last few weeks were very uncomfortable and I had to use the bathroom every hour. That would make a 4 hour drive into 5 hours. Have a girlfriend come stay with you if you don't want to stay alone.
While babies can occassionally arrive 2 weeks early it's rare and you probably won't have the baby at 3 weeks early. And - as another person wrote - even if you go into labor 4 hours is still enough time for your husband to get back home.
On the other hand if you're close with his family and the ride won't be too uncomfortable for you go for the service. I hate to say it - but funerals are one of the only times you get to see extended family as you all grow up. You and your husband may enjoy seeing his family and they may enjoy seeing you pregnant - kind of illustrates the continuing widening circle of family - and that even when one person dies there's still new life to celebrate and life goes on.
The very worst case scenario is that you go in to labor and have the baby in another city. While it's not your first choice - but it would make for a fun birth story years later for your child. Fortunately we live in America and there are good hospitals withing a hour drive of almost everywhere.
Whatever you do it will end up being the best decision for you - just weigh out all the options and discuss with hubby.