How long had you had him? It takes time for them to settle in and understand that you aren’t a threat.
Does he have a friend? Piggies shouldn’t be kept alone, they should be in pairs. Having a friend can help him gain confidence.
Hand feeding, sitting with and talking to can help.