This work presents the development of an innovative plasmonic optical fiber (OF) immunosensor for the detection of cytokeratin 17 (CK17), a biomarker of interest for lung cancer diagnosis. The development of this sensing platform is such that it can be assessed in non-liquid environments, demonstrating that a surface plasmon resonance (SPR) can be excited in this case. For this purpose, detections have been first carried out on CK17 encapsulated in gel matrix in the aim of mimicking tissue samples. Gold-coated OF immunosensors were embedded in a specifically designed packaging providing enough stiffness to penetrate into soft matters. Resulting reflected spectra have revealed, for the first time, the presence of a stable SPR signal recorded in soft matters. Experiments conducted to detect CK17 trapped in a porous polyacrylamide gel matrix have highlighted the specific and selective biosensor response towards the target protein. Finally, the packaged OF immunosensor has been validated by a preliminary test on human lung biopsy, which has confirmed the ex-vivo CK17 detection. Consequently, this work represents an important milestone towards the detection of biomarkers in tissues, which is still a clinical challenge for minimally-invasive in vivo medical diagnosis.