Structural transition of skyrmion quasiparticles under compression