and cd free5gc try to make it.
If you still occur the same error, the reason may be amf’s go.sum and go.mod are mismatch.
Please cd NFs/amf and remove go.sum and go.mod, then use following instruction:
go mod init amf
go clean -modcache
go mod tidy
And cd free5gc/ try to make again.
Hope this way can help you!