configuration.GetSection("sectionname") return a new Configuration with only the section values. "JwtSettings:Key" is probably a property and not a section. you can use the .Bind(object) to bind the parameters to an object.
var jwtSettings = new JwtSettings();
configuration.GetSection("JwtSettings").bind(jwtSettings);
var key = jwtSettings.Key;
your next line uses the options pattern, and you need to define an options class: