In order to marry Anora, you must not kill Loghain.There are a few different combinations that will allow your marriage with Anora to proceed, and a few that you’ll need to avoid. During the Landsmeet, it is possible to either have Loghain killed or spare him.
Choose the right options during the Landsmeet.