Adam Schefter says the 49ers aren't committed to Brian Hoyer as the team's starting quarterback. (0:43)

Free-agent quarterback Brian Hoyer is expected to sign a multiyear contract with the San Francisco 49ers, who also plan to sign receiver Marquise Goodwin and Pro Bowl fullback Kyle Juszczyk, sources told ESPN.

Niners starter Colin Kaepernick opted out of his contract this offseason, leaving San Francisco without a quarterback under contract. Hoyer agreed to his deal -- believed to be for two years and around $6 million per season -- with the understanding that he will get a chance to start.

The Buffalo Bills -- before they agreed to a new deal with Tyrod Taylor -- and New York Jets were among the teams in the running for Hoyer.

Brian Hoyer: 2014 Season With Shanahan Brian Hoyer spent the 2014 season with the Browns when new 49ers head coach Kyle Shanahan was Cleveland's offensive coordinator. Hoyer had a strong start to the season, but he struggled in his final five games. 1st 9 games Last 5 W-L as starter 6-3 1-4 Comp pct. 59% 50% Yds per att. 8.0 6.8 TD-INT 10-4 2-9 Total QBR 50 31 -- ESPN Stats & Information

In San Francisco, Hoyer will be reunited with Kyle Shanahan. The new 49ers head coach was the Cleveland Browns' offensive coordinator in 2014, when Hoyer started for the team. Hoyer started strong that season but struggled over his final five games.

Hoyer, 31, performed well in five starts for the Chicago Bears last year, but his season ended when he broke his left arm at Green Bay in Week 7. He threw for 1,445 yards, six touchdowns and no interceptions.

An eight-year NFL veteran, Hoyer signed with Chicago last offseason partly because of the strong relationship he enjoyed with Bears offensive coordinator Dowell Loggains, who previously served as Hoyer's quarterbacks coach in Cleveland.

Goodwin, 26, enjoyed his best season in 2016 with the Bills, catching a career-high 29 passes for 431 yards and three touchdowns. He played in 60 percent of offensive snaps and saw an increased role after injuries to top receivers Sammy Watkins and Robert Woods.

The Bills selected the speedy Goodwin in the third round of the 2013 draft, but he was limited to 24 games over his first three seasons because of several injuries.

Juszczyk, who turns 26 on April 23, has spent his entire career with the Baltimore Ravens. He reached his first Pro Bowl last season after being listed as the NFL's highest-rated fullback by Pro Football Focus. He led all fullbacks in receptions the past two seasons, catching a total of 78 passes for 587 yards and four touchdowns.

Hoyer started 16 games for the Browns from 2013 to 2014. He made nine regular-season starts for the Houston Texans in 2015, passing for 2,606 yards, 19 touchdowns and seven interceptions. In his only playoff start, however, Hoyer threw a career-high four interceptions in a loss to the Kansas City Chiefs, which ultimately led to his release from Houston.

The Niners also are expected to sign receiver Pierre Garcon, sources told ESPN's Chris Mortensen.

Goodwin also was an All-American track and field athlete at Texas who competed in the long jump at the 2012 Olympics in London. He finished seventh in long jump trials before the 2016 Olympics in Rio de Janeiro, failing to qualify for a trip to Brazil.

Goodwin ran the 40-yard dash in 4.27 seconds at the 2013 NFL combine, which at that point was the third-fastest recorded time in the event's history.

ESPN's Adam Caplan, Adam Schefter, Josina Anderson, Jeff Dickerson, Mike Rodak and Jamison Hensley contributed to this report.