It's very easy. You do not need to change trains.
From Shinjuku you take the Toei Shinjuku Line (green) and leave at the fourth stop at Kudanshita.
From Kudanshita Station you have to walk towards the west for about 10 to 15 mins. You may visit the adjacent Budokan as well whilst you are on the way to Yasukunijinja.