when i try to marry him to anyone it happens and when he goes to other courts he is put into a matrilineal marriage so i would have to kill him, and he goes to different courts each time I try to get him to marry someone
You need to look at who you are marrying your family to, but pay special attention to your top 3!! The top 3 of every generation need to be with you at all times. The most oft reason your heirs leave, is because you tried to get land via marriage. IMHO, while it is cool to take land, you put your game at risk, because you will have many people now who want to kill your heir!! The bottom line is, if you want to control your heirs, keep them home at all times!! I will admit, I find the marry for land via heirs cheeze and to easy. So I refuse to use it, yes I know it is true in history, but cheeze is cheeze to me. I have found after playing Denmark, that elective is insane and might be a tad OP!! My last 2 rulers are MT, and my next one should be also, do to the fact they are being trained by current ruler.
How to keep your heirs secure? 1. Marry no one with any claims at all, it is marrying down yes, but your heir will stay put. 2. Top 2 claiments, also keep home, the same way!! Use your daughters for Allainces or a better Council member, marry the extra sons for land. While you will not control the land, you do get the extra prestige. Do not discount this extra prestige, it allows you better marriages, and this is the best thing about imho, when you get a good bunch of family prestige, you can raid pretty much any concil member in the game, which means your council is awesome, but the best part is your army, you will have the best generals in the game.
Also keeping the top 3 in house allows you to breeed well so you can have MT people traing your kids.
Also, every dynstay member who rules another land, is your ally for life!!