You can’t have Word to selectively remove some of the carriage returns. You can use the advanced replace function to remove all the carriage returns. It just doesn’t have any sophisticated regular expression handling ability to let you do that.
Click “More” in the dialog.
In the “Special” dropdown, select “Manual Line Break” and ensure it puts a ^| in the “Find What” textbox. Leave “Replace With” blank. Click “Replace” a few times to make sure it’s doing what you want - if so, click “Replace All”.