This one is slightly harder than it seems. You need to first unlock the Han Solo (Classic) carbonite block, which is found on the Millennium Falcon. To find this one, you need to go into the room that was originally filled with toxic gas, and Finn had to clear. On the left, through the door, is a minigame: smash the boxes and use BB-8 to start it.
The game can be frustrating. It took me several times of raging to get it. (Maybe that's just me.) However, Calex dEUS found the perfect way to get this with no problems at all. It's a perfect line (although in the video below I got hit once and then corrected myself). I don't show the carbonite block because I already had it, but it's in the grey locker right next to the game.
After all of this, unlock the carbonite block in the med lab on D'Qar, then go back to the Falcon. You can unlock it in free play.
Best of luck!