You need to look at the compression distance.
You may find pistons that have the same compression distance but they will also have different rod lengths.