In order for him to do so, he is told that he should get remarried so his new wife could be the primary beneficiary; it doesn't specify "who" he has to marry.
He should get remarried. This was what he is told in order for him to do so. His new wife could be the primary beneficiary. It doesn't specify "who". He has to marry who.