It sounds like you need to adjust the "limit" screws which set the inner and outer derailleur travel limits. When you said the easiest (largest) cog isn't shifting well what is the symptom? Is the chain not going all the way onto the cog or is it overshifting the cog? If the former, loosen the low limit screw a 1/2 turn and see if that is enough.
BTW, your problem is very common. Even "identical" wheels with the same cassette, etc. often require minor limit screw adjustments when swapped.