You mentioned that you wanted the Sun to become some sort of black hole or wormhole that transports the Earth into a different Solar system. Previous answers have talked about how unlikely a random exit into another Solar system. But what if the exit wasn't random because someone else caused the wormhole to form in the first place?
Allow me to introduce you to SCP-2047.
Comparison between Sol System and Theta-c System.
Notice something wrong there? SCP-2047 describes an event where, by anomalous means, the Earth and another planet, named "Pycole" by it's inhabitants, swap positions via wormhole. The original Sol system contained three inner rocky planets (Mercury, Venus, Earth) and three outer gas giants (Hera, Jupiter, and Pluto).
The apparent age of Theta-c is 4.7 billion years, exceeding the Earth's approximate age by around 0.2 billion years. The development of both anaerobic and aerobic life assisted in the creation of this planet's ozone layer, although aquatic-based lifeforms were more prominent in Theta-c's development of sentient life. Its gravitational force is 9.582 m/s2, just below that of Earth's. Each day on Theta-c is just above 24 Earth hours. For every two centuries on Theta-c, there is approximately one additional Earth day.
It should be noted that Pycole and Earth are very similar, with similar ages, distance from the Sun, gravitational constants, rotational speeds, and forms of life.
The former Sol system, prior to Event 2047-1, contained a single main sequence star of 1.0034 solar masses.
It should also be noted that the original Sol and Theta-C (what we know as the Sun) were also extremely similar.
This wormhole that swapped the two planets was not a naturally occurring event, but instead generated by the inhabitants of Theta-C as part of an "interstellar exchange program". It would stand to reason that, given sufficient levels of technology, this exchange could be controlled such that Earth would exit the wormhole with the proper orbital and rotational motion so as to not cause significant (physical) damage to the Earth. We know the Earth would be stable in that orbit because the very similar Pycole was already stable in that orbit prior to the swap.
But "Aliens did it, handwavium, etc" is boring, and not the only reason why I bring up SCP-2047.
Event Log 2047-A-1973:
Day 1, 7/13/1973: At 00:01:01, Earth and an exoplanet designated Theta-c undergo an exchange of spatial position. Earth is deposited in Theta-c's previous solar system, while Theta-c takes Earth's spot in the old Sol System. The process occurs instantaneously. No contact can be established with the lunar Minerva project. (See Supplement 2047-E for information on Theta-c.)
Day 2, 7/14: Radio transmission is relayed through SCP-2047 at 01:32:57, via its spatial anomaly and multi-locational existence. Radio transmissions are initially audible and are initiated in an unknown language (presumed to be one of those used on Theta-c). Over the next 12 hours, the language converts into increasingly fluent English, until full communications between Earth and Theta-c are established. Theta-c's "interstellar exchange program" is first described. The Foundation requests a reversal of Event 2047-A. Theta-c responds with denial.
Day 113, 11/1 : Knowledge of Event 2047-A eventually spreads over the first two weeks. The Foundation has no viable method of hiding the knowledge of the cosmic shift. Religious institutions experience a peak in attendance, and some reform their values to accommodate for this event, while others dissipate entirely. No knowledge of the existence of other sentient life reaches the public. As news of the loss of the Minerva project reaches the public, however, general anxiety increases. Foreign relations between major powers become strained as the United States, Soviet Union, and China enter a space race to explore the new solar system. The Middle East experiences a non-violent wave of protests and demonstrations in response to the upheaval of the known world, and unrest with their civil governments. Containment efforts by the Foundation are beginning to become problematic due to the Foundation's use of resources on continued efforts to prevent societal collapse. Requests to Theta-c for assistance are denied. (See Supplement 2047-F for information on previous exploration of the solar system.)
Day 286, 4/23/1974: Containment of Keter-level SCP objects grows increasingly difficult and strains a majority of Foundation resources. Hostilities between nations increase as they become increasingly suspicious of one another. The United Nations becomes a strained force, not very effective in mitigating the deterioration of relations. Southeast Asia experiences a systematic political repression as China falls behind in the Space Race, followed by religious accusations in response to the increased volume of religious activity. Requests to Theta-c for assistance, following a presentation of detriments to the human race, is approved.
Day 339, 6/17: A collaboration between Theta-c and Earth is initiated in order to attempt to reverse the detriments of Event 2047-A. Theta-c announces to the Foundation that reversal of the entire process is impossible, but suggests that a localized reality reset may be viable. Using a combination of SCP-2047 and Theta-c's technology, a CK-class Reality Restructuring Scenario is created, and includes a mass change to astronomical data, records, and memories revolving around the field of astronomy. This restructuring also resets the date on Earth to July 13th, 1973. Foundation staff at Site-88 (which houses SCP-2047) maintain full records relating to Earth's previous location, and are excluded from the reality restructuring in order to facilitate the further suppression of knowledge. After a full debriefing of top Foundation personnel, the residents of Theta-c are informed that further collaboration with the Foundation would not be continued due to an unacceptable risk of societal collapse stemming from uncertainty relating to previous events.
Based off what kind of story you wish to tell, you can go in any number of directions from the initial swap.
Do you want the planet to survive, but completely destroy everything on the surface? Screw up the transfer. Even placing it at the proper distance from Theta-C, a drastic change to the rotational speed of the Earth should be sufficient to kill almost everyone on the planet and covert anything less stable than a nuclear fallout bunker to rubble.
Do you want the planet to survive but have everyone kill themselves? Or do you want a world buried in conflict? Or do you want a Fallout type world? Etc? Take out the part where Theta-C and the SCP Foundation reset everyone's memories. It wouldn't be a huge leap in logic that society, after public knowledge of this swap, could go in any direction you want it to go. Even if you don't want to wipe everything out but make everything be much weirder, you can go this route and avoid the complete societal collapse that was implied to be starting in the log.
Do you want there to be some sort of conspiracy about the whole thing or a mystery? Go with a similar storytelling device to SCP-2047 and have some secret organization wipe everyone's memories.