The have the same meaning. I prefer the second. It is just a matter of style.
Student or Learner
Is there any difference between these sentences?
Which is more natural? And can you explain the reason to me, please?
(A) To do this job is a lot of fun.
(B) It's a lot of fun to do this job.
You could also use Doing this job is a lot of fun.