The capital must be invested or actively being invested at filing. The two-year conditional period starts when the investor is admitted or adjusted as a conditional permanent resident, not when the money is paid.
Two different clocks, and the farm sale controls neither
The first clock is the filing requirement: the investor must show the capital invested or in the process of being invested when the petition is submitted, so the farm sale and the transfer of proceeds must precede filing. The second clock starts much later, when the petition is approved, an immigrant visa is issued or status is adjusted, and the investor becomes a conditional permanent resident; the two years run from that admission date, and the I-829 window opens ninety days before the second anniversary.
Between those points the investment must be sustained and the jobs created, so the project's own timeline should be read against the expected adjudication and visa-availability periods. Do not assume the sale closing date has any significance for the immigration calendar beyond making the capital available; and do not let a buyer's closing deadline push the family to file before the trace is complete.