The New Horizons space craft set a record at 36,000 miles per hour, the fastest spaceship relative to Earth ever achieved. The sun is 94 million miles away, so if you divide 94 million by 36,000 mph you come up with 2666.67 hours, or 111.111 days. That’s about 3 months and 21 days, round out to 4 months to be safe.
However, you can’t just launch a space ship from Earth directly at the sun and expect to go 36,000 mph. New Horizon’s speed was achieved through slinging around planets, what we call “gravity assist.” Your sun bound space craft would begin slowly and take a very long time to reach the sun.
If it took the Apollo astronauts 3 days to go 250,000 miles to the moon. At that speed it would take just over 3 years to reach the sun.