You asked:

was gregory peck in to kill a mockingbird

Yes. Gregory Peck is a cast member of To Kill a Mockingbird.
Gregory Peck
Gregory Peck
Gregory Peck

To Kill a Mockingbird