Grant was not in charge of the Union armies for two years. When he was placed in charge, he defeated Lee rather rapidly.
After the South had been under blockade for three years and had little supplies or food ans Lee was almost always outnumbered and outgunned. Grant wasn't half the general that Lee was.