Gram-positive bacteria possess a thick peptidoglycan layer in their cell wall.
This rigid layer provides mechanical strength and prevents the cell from bursting due to osmotic pressure.
Hence,
\[
\boxed{\text{Peptidoglycan thickness}}
\]
is directly responsible for resistance to osmotic lysis.
Therefore,
\[
\boxed{(B)}
\]