If you mean to replace a preprint by a published version, see my reply to https://www.researchgate.net/post/How_can_I_remove_the_word_preprint_in_an_article_and_change_it_by_article.
If in ResearchGate the type of the preliminary version is already "Article" or "Chapter" or "Book" and you just want to replace the full text, see https://help.researchgate.net/hc/en-us/articles/14293099743121-How-to-make-content-private-or-remove-it.