Do primary keys change when indexes are rebuilt or reorganized?
No, they will not.

Rebuilding or reorganizing an index should never alter the underlying data itself, only its placement within database pages / extents.

However, as an aside have a read through this post - you might find that you don't need to rebuild these indexes in the first place.