Although it is problems between you and your ex that have caused the rift, children often feel that they are in some way to blame for their parents separation. Nathan no doubt feels that Dad left him, rather than you! This will be especially true if Dad's visits are rare or erratic. As a result he feels guilty, angry, and abandoned. He may also worry that you may be the next to leave him.
This being the case, the fact that you have now brought in another man presents a couple of problems. First, it dashes hopes that one day Mum and Dad might get back together again. Secondly, it means that someone else is stealing all that attention that Nathan had been getting from you when you were single. No wonder his nose feels out of joint!
Perhaps Nathan got on really well with David before you married. At that stage, he was just Mom's boyfriend. Then, he was fun to have around, and never tried to act bossy. Now he is living in the house like he owns it.
Making the transition from visitor to parent is often very tricky. The key to it is to be open and honest about it all. Communication is the key. Make time to talk together, regularly, in various combinations: you and Nathan, Nathan and David, and all three of you. Include your other children if you have any.
Acknowledge Nathan's confusion, anger and resentment. Make it clear, also, that David is not taking Dad's place, and never will. It is all right for Nathan to love and miss his father - even if you don't! Try to remain matter-of-fact about the separation, and keep the children out of any ongoing battles that you are having with your ex.
Make it clear, also, that David is here because you love him and want him in the family. This does not mean that you love Nathan any less. Also, for Nathan to like David does not mean that he is being disloyal to Dad.
Finally, make it quite clear that you have given full authority to David to have parental authority in the home. What David says is what goes. Do not allow Nathan to come to you to try to undermine decisions that David has made. Even if you disagree with what David has said you will need to back him up in public. Then when you are alone with him, you can sort out your disagreement. Nathan must see and hear that you are both completely united, and that you will back up David one hundred percent.