List values inside the custom field (single select) using the External API

I am trying to list values inside the custom field (single select) using the external API below is the behavior I created but it’s not working:

import com.onresolve.jira.groovy.user.FieldBehaviours
import com.atlassian.jira.issue.priority.Priority
import groovy.transform.BaseScript
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.component.ComponentAccessor

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def optionsManager = ComponentAccessor.getOptionsManager()

import groovy.json.JsonBuilder
import groovy.json.StreamingJsonBuilder;
import groovyx.net.http.HTTPBuilder
import static groovyx.net.http.ContentType.*
import groovyx.net.http.ContentType
import static groovyx.net.http.Method.*
import groovy.json.JsonSlurper
import net.sf.json.groovy.JsonSlurper

@BaseScript FieldBehaviours fieldBehaviours

def serviceProvider= getFieldByName(“Service Provider”).getValue()

def supplierAPI = new JsonSlurper().parse(new URL(“http://perfect-day-demo.herokuapp.com/api/meta/logistics_suppliers”))
def searchsupplier = supplierAPI.findAll{it.name=="${serviceProvider}"}

String SP =searchsupplier[0].name

Can you please help me for correcting the code