I don’t think this is what’s happening here.
A paragraph is going to have a space between the current and the next paragraph. This is by default in Google Docs.
If you do not want “two newlines”, you could insert all of the text as a single paragraph, with a single newline (line break) inserted wherever you want.