No you're right, height of a cylinder is effectively the same as the stroke (swept volume of a cylinder) for volume or displacement calculations.
FYI combustion chamber volume does not count as engine size/displacement.
Google has a handy calculator. Here I used the bore & stroke dimensions from Triumph for the 2.3L bike to calculate overall engine displacement (2294cc)
(note the bore & stroke are in mm so you have to convert that volume to cubic centimetres by dividing by 1000)