I think he thought it would succeed and put him in power. When that failed he went mostly silent for a long time, probably trying to figure out how to survive. While it is no surprise to anyone (including him) that he was still a target, I think he made a reasonable (though on hindsight obviously wrong) assumption that things have cleared up enough by now to be worth risking travel.
It’s astounding that Prigozhin was so naive as to think that he could attempt a coup against Putin, and then simply retire in exile to Belarus. Everybody knew something like this would happen, except Prigozhin himself apparently. People have suffered ‘unfortunate accidents’ at the hands of Putin for far less.