All my vNext builds were working fine, suddenly started receiving "Object reference not set to an instance of an object." error in the initialize job.
Any issue or mistake from Build Agent setup?
Refer to the comments from this msdn link.
There might be a corrupted file under _work folder. Delete the contents under that folder and try the build again.
If that doesn’t work, try renaming your build definition.
In my case, it was just enough to delete the specific Agent folder under _work.