With current space technology, it would take a considerable amount of time to travel to the Sun. The Sun is located approximately 93 million miles (150 million kilometers) away from Earth.
The fastest spacecraft ever launched by humans is the Parker Solar Probe, which was launched in August 2018. Its mission is to study the Sun up close and gather valuable scientific data. Despite being designed to get closer to the Sun than any previous mission, the Parker Solar Probe's speed and trajectory are still not sufficient to reach the Sun directly.
The main challenge in reaching the Sun is the tremendous amount of energy required to counteract the Sun's gravitational pull. Even though the Sun's gravity decreases as you move away from it, it remains quite strong close to the Sun.
At its closest approach, the Parker Solar Probe will get within about 3.83 million miles (6.16 million kilometers) of the Sun's surface, which is roughly 4% of the Earth-Sun distance. To achieve this distance, it required a series of gravity assists from Venus to gradually reduce its orbital energy and approach the Sun.
To travel all the way to the Sun, we would need a significant technological advancement in propulsion systems that can generate immense speeds. At present, our spacecraft primarily rely on chemical propulsion systems, which are not sufficient to achieve such high velocities.
Given the current limitations, it is difficult to provide an exact estimate of how long it would take to reach the Sun. However, it would likely require many years or even decades of travel time, depending on the spacecraft's speed and trajectory.