So long as there are clues and the story makes sense on a second reading after learning the plot twist. I'd be fine with it, but I doubt I'd enjoy such a severe swap?
It would depend on a lot of factors, but I believe I'd generally prefer a novel without such a severe change