Anabolic reactions and reaction energy
Both statements are correct, but an understanding of why they are not contradictory requires a bit of explanation.

For "spontaneous" reactions, those which occur naturally, entropy must always increase.  As a general rule, one of the easiest ways to increase entropy is to release energy, so we generally find that spontaneous reactions release energy.*  It's a pretty decent rule of thumb to use.

In the case of an anabolic reaction, we're putting together complex molecules from simple ones, and for these particular reactions we see they don't release energy.  They in fact "consume" energy in their formation.  This is reasonable, so what we find is that such reactions are not "spontaneous."  We don't see them just occurring on their own.

To make an anabolic reaction occur, we need to change the environment such that the reaction becomes spontaneous. We need to change the environment such that the reaction releases energy.  To do that, we start off with inputs which have even more energy than the final product should (such as extra kinetic energy from heat, or a strong oxidizer to reduce one of the reagents, or any one of a number of chemical and mechanical approaches).  Now the formation of the complex molecule can release energy, so it can occur spontaneously.  When we do this, we release some energy, but not all of it.  The rest of the energy is consumed in building the bonds of this molecule that would not otherwise have spontaneously come into being.  The released energy is typically seen as waste, and the energy pent up in the molecule is your desired product.

So in the end, the reason why there's no conflict is the "In general..." bit in the first quote.  You can cause a reaction to occur that consumes energy, but you typically have to do some clever things to put the energy into it.  Reactions which release energy occur spontaneously.  In general, we find "spontaneous" reactions occur far more often, hence the rule of thumb.

* I'm pretty loose with energy and entropy here to try to paint a simple picture without all of the confusion that entropy always brings to a discussion.  As you learn more, do expect to need to be more precise than I am here.