@CharlieShi I had the same problem and I noticed that I was forgetting to add inheritance to my class. But in your case, try this:
builder.RegisterType<DynamicQuery>().As<IDynamicQuery>().InstancePerHttpRequest();
reverse the interface with the class!