For this issue ,it could be caused by the change in permission settings in Version Control.
You can go to the project settings --> Repos --> selected Git repositories on the left and make sure to include Project Collection Build Service(project)
under Users. You can refer to this case for the similar issue.

If the above not work, I need some information for further investigation:
Which agent do you use? If you use private agent, please try to select clean source directory in your build definition and then queue the build agent by private agent. Also, please try to set System.Debug variable to true in build definition, then queue build and post the detail log here.