Which 2 cogs can you not get onto?
If the large ones, could be the cable is too slack or rear mech limit screw needs adjusting
If the small ones, then cable too tight or limit screw or sticking cable as per John. Or a combination of these!
Or bent rear mech?
You need to shift the lever to the extreme bottom (high gear) position, disconnect the cable from the mech and make sure the chain is running smoothly on the smallest sprocket and the cable running free, also that the lever is at the very bottom end of its travel before re-attaching/adjusting the cable. Then shift down the gears to the large sprocket and adjust the limit screw once you get there. If you cannot get into the low gear then you may need to adjust the limit screw.
As far as I am aware, Shimano use the same bar end shifters for 8 and 9 speed, to use with a 9 speed cassette you need to set up the levers with the 'high' gear position right at the limit of the lever's travel, not on the last real 'click' (if you see what I mean). This means that the position of the chain when in top gear is set by the rear mech limit screw, not the shifter. It also means you need to adjust the cable in a gear other than top to get good indexing in the other gears.
Hope this all makes sense, hope you get sorted and good luck with the ride!
David