I guess it would be possible, but I would argue that Shaft's race is pretty important to his character. He was specifically created as a black James Bond. Certainly more than Spiderman - so if nothing else it is a terrible choice of example.
Spiderman being a teenager is central to his character, at least initially, but not his race. His age is just as important to the character as Shaft’s race. I think you could make Shaft in his 20’s as long as he was black, just like you could make Spiderman black just as long as he was a teenager.