What's wrong with this proposed resolution to the St Petersburg Paradox? We have a game where your payout is $2^k$ where $k$ is the number of times you flipped a coin to land on heads (if your first flip is a head, then $k=1$). Then the expected payout is: $$E = \frac{1}{2}(2) + \frac{1}{4}(4) + \frac{1}{8}(8)+...$$
$$E=1+1+1+...$$
$$E=\infty$$
How much should I pay to play this game?
Well we know from the geometric distribution the expected number of coins I'll flip until getting a head is:
$$\frac{1}{P(HEAD)} = \frac{1}{.5}=2$$
So I will pay anything less than $2^k$ with $k=2$:
i.e. < 4 dollars
https://en.wikipedia.org/wiki/St._Petersburg_paradox for reference
 A: There's nothing wrong with that proposed resolution.
In the original paradox we look at the expected value (mean) of the profit which is infinite and therefore you should stake an infinite amount. However, after the first flip of the coin there's a 50% chance that you've lost money and that is why people don't like it. Your resolution just formalizes this, instead of looking at the mean profit you are looking at the median profit. Unlike the mean profit, the median profit is finite and the paradox goes away.
A: If I understand correctly, your analysis is:


*

*Calculate the expected number of coin-flips required to get a head.

*Calculate the payout for the outcome where you get exactly the expected number.

*Value the game equal to that payout.


...OK, let's modify that game a little bit. Just like the original version, I will flip a coin and keep flipping until I throw heads. Only the payouts have changed:


*

*If I flip heads on the second throw, you get four dollars.

*On any other outcome, you lose everything you own and have to come work for me forever, for free.


How many coins do we expect to flip before we get a head? 2, exactly the same as before.
What is the payout for the outcome where we flip two coins to get a head? $4.00, exactly the same as before.
How much would you be willing to pay for the 'privilege' of paying this game that has a 75% chance of bankrupting you and a 25% chance of returning $4.00?
I suspect the answer is not "up to four dollars, exactly the same as before". Which means there's a hole in your logic.
Taking a broader perspective, expected winnings are not necessarily enough information to answer this sort of question; usually it depends on some additional context. Is this a one-off opportunity or are you expecting to be offered this gamble many times? How much money do you have on hand? And how much money do you need to be happy?
For example, if my total wealth is $100 but I urgently need a million dollars for a life-saving operation, I would be willing to pay all my money for a single shot at the St. Petersburg gamble. It only gives me a 1/2^19 chance of winning the money I need, but if I don't play I have no chance at all.
On the other hand, if my total wealth is $1000,000 and I need exactly a million dollars for that operation, the most I'd be willing to pay for a single game is two dollars (which I'm guaranteed to win back). Anything more, and I have a 1/2 chance of ending up short of the million bucks I need to save my life.
If I'm expecting to have many chances to play such games, then I probably want to choose a strategy that gives me a high probability of having lots of money at the end of all those games. For example:
Game A is guaranteed to increase my wealth by 10% every time I play it. (Expected winning: +10% of my current wealth.)
Game B has a 90% chance of doubling my wealth, and a 10% chance of bankrupting me. (Expected winning: +70% of my current wealth.) [edit: actually +80% because I fail at basic arithmetic, but the argument still holds.]
If I play 100 iterations of Game A, I'm certain to multiply my wealth by 13,780 times. 
If I play 100 iterations of Game B, I have a 0.0027% chance of becoming unimaginably wealthy (about 10^30 x what I started with)... and a 99.73% chance of being bankrupted. Even though the average is better than for Game A, it's not a good option. 
For this sort of heavily-iterated game, rather than trying to maximise my expected winnings in each game, I'm better off trying to maximise expected value of ln(total wealth after game/total wealth before game). This ensures long-term growth without getting wiped out.
If the stakes for every game are small relative to my total wealth, then this is approximately equivalent to maximising expected winnings in each game.
So, if you're playing lots of games and never risking a large portion of your current wealth, then the expected value of the gamble tells you all you need to know. In just about any other situation, you need to think about other things too.
A: *

*Let $K$ be some random variable.


*

*In your problem, $K$ is number of times you flip before getting heads.


*Let $f(k)$ be some payoff function.


*

*In your problem $f(k) = 2^k$.


*Let $f(K)$ be the payoff
You're saying that a reasonable valuation of the gamble $f(K)$ is given by $f(\mathrm{E[}K])$. This is an entirely ad-hoc, rather unprincipled heuristic. Perhaps fine in some situations (eg. where $K$ is small and $f$ near linear), but it's easy to construct an example where it suggests something non-sensical.
Example where your system makes absolutely no sense
Let $K$ be a draw from the normal distribution $\mathcal{N}(0,10000000000000)$ and let the payoff function be $f(K) = K^2$. Your system says I shouldn't pay more than $0$ for this gamble because $f(\mathrm{E}[K]) = 0^2 = 0$. But shouldn't you assign some positive value to this gamble?! There is a 100% probability the payoff is greater than zero!
A more classic resolution of the St. Petersburg Paradox
One approach is to add risk-aversion. If you're sufficiently risk averse, what you're willing to pay to play this infinite expectation gamble will be finite. If you accept the Von Neumann-Morgernstern axioms, then the certainty equivalent of playing the game is given by $z$ where:
$$u(w + z) = \mathrm{E}[ u(w + f(K)) ] $$
and where $w$ is your wealth and $u$ is a concave function (in jargon, a Bernoulli utility function) which captures your level of risk aversion. If $u$ is sufficiently concave, the valuation of $2^K$ will be finite.
A Bernoulli utility function with some nice properties turns out to be $u(x) = \log(x)$. Maximizing expected utility where the Bernoulli utility function is the log of your wealth is equivalent to maximizing the expected growth rate of your wealth. For simple binary bets, this gives you Kelly Criterion betting.
An important other point is that the risk aversion approach leads to different certainty equivalents depending on what side of the gamble you are on.
