Freeing stuck object from wellbore