First, you backup you project.
Second, right click .uproject file, select “Switch engine version…” and choose 5.0.