Sql Server Replication requires the actual server name to make a connection to the server I get the following message when I want to create a Remote Distributor.
First i delete my whole configuration of replication then after i take a first step to create new replication and i get below error for creating a Distributor....

I already do this but still same error........

sp_dropserver 'NODE-XYZ';
GO
sp_addserver 'NODE-XYZ', local;
GO


when run this command to get actual name then i get 'NULL' value

SELECT @@SERVERNAME
GO
You need to restart your instance after doing sp_addserver in order to get a proper @@SERVERNAME response. This is from BOL: 


  The local definition takes effect only after the Database Engine is restarted. Only one local server can be defined in each instance of the Database Engine.