So, your issue is here:
XPathNavigator queryField = MainDataSource.CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:queryFields/q:Provider_Info/@Provider_Name", NamespaceManager);
This is because your XPath is not a field in the main data source, so queryField is null. You need something like the below example, replacing NAME OF YOUR DATA SOURCE GOES HERE with your data source name.
XPathNavigator queryField = this.DataSources["NAME OF YOUR DATA SOURCE GOES HERE"].CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:queryFields/q:Provider_Info/@Provider_Name", NamespaceManager);