You cannot use #1 unless the person you are talking to does, in fact, sometimes take a walk for exercise. You can use #2 in a more general sense, to explain why you like to take walks or to suggest that the other person might take walks.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
1: It is good that you take exercise.
2: It is good to take exercise.
I must admit, I would take #1 for a general statement, if 'you' were changed to 'people':
3. It is good that people take exercise.
(But maybe something has escaped me. I am a little fuzzy today.)
MrP