Surface plasmon resonance and field confinement in graphene nanoribbons in a nanocavity