Correct, you will be doing what is called "sistering" or a "crippled stud"..
Basically, you cut out ALL of the rotted wood back to good wood, you must get all soft or blackened rotted wood cut out, leaving that in place will eventually rot any good wood you have.
Then you will place a stud BESIDE the existing stud, making sure you go some distance back on the existing good part of the stud and nail, glue, screw the cripple to the existing stud..
Optionally you can make a repair piece that buts to the existing and tie the cripple to that also..
For max strength (in a roof might be a good idea, due to snow loading in winter) you can add a second cripple to the other side of the existing stud..
And yes, you WILL have to taper the ends as they get close to the side walls.
Very basic carpenter work.